rc-qlc 0.3.24__cp310-cp310-macosx_11_0_arm64.whl → 0.3.25__cp310-cp310-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. qlc/cli/__init__.py +100 -9
  2. qlc/cli/installer.py +23 -5
  3. qlc/cli/qlc_main.py +54 -32
  4. qlc/cli/qlc_py_main.py +43 -38
  5. qlc/config/json/qlc_config.json +94 -10
  6. qlc/config/nml/mars_A1_sfc.nml +4 -5
  7. qlc/config/nml/mars_A3_sfc.nml +0 -1
  8. qlc/config/nml/mars_B1_pl.nml +2 -2
  9. qlc/{examples/cams_case_1/config/nml/mars_A3_sfc.nml → config/nml/mars_B1_sfc.nml} +7 -8
  10. qlc/config/nml/mars_C1_pl.nml +1 -1
  11. qlc/{examples/cams_case_1/config/nml/mars_C1_pl.nml → config/nml/mars_C1_sfc.nml} +7 -8
  12. qlc/config/nml/mars_C2_pl.nml +1 -1
  13. qlc/{examples/cams_case_1/config/qlc_cams.conf → config/qlc.conf} +80 -18
  14. qlc/doc/README.md +98 -62
  15. qlc/doc/USAGE.md +68 -29
  16. qlc/examples/cams_case_1/mod/b2rn/2018/b2rn_20181201-20181221_B1_pl.grb +0 -0
  17. qlc/examples/cams_case_1/mod/b2rn/2018/b2rn_20181201-20181221_C1_sfc.grb +0 -0
  18. qlc/examples/cams_case_1/mod/b2ro/2018/b2ro_20181201-20181221_B1_pl.grb +0 -0
  19. qlc/examples/cams_case_1/mod/b2ro/2018/b2ro_20181201-20181221_C1_sfc.grb +0 -0
  20. qlc/install.py +260 -106
  21. qlc/py/__main__.cpython-310-darwin.so +0 -0
  22. qlc/py/averaging.cpython-310-darwin.so +0 -0
  23. qlc/py/bias_plots.cpython-310-darwin.so +0 -0
  24. qlc/py/control.cpython-310-darwin.so +0 -0
  25. qlc/py/io.cpython-310-darwin.so +0 -0
  26. qlc/py/loadmod.cpython-310-darwin.so +0 -0
  27. qlc/py/loadobs.cpython-310-darwin.so +0 -0
  28. qlc/py/logging_utils.cpython-310-darwin.so +0 -0
  29. qlc/py/map_plots.cpython-310-darwin.so +0 -0
  30. qlc/py/matched.cpython-310-darwin.so +0 -0
  31. qlc/py/plot_config.cpython-310-darwin.so +0 -0
  32. qlc/py/plotting.cpython-310-darwin.so +0 -0
  33. qlc/py/plugin_loader.cpython-310-darwin.so +0 -0
  34. qlc/py/processing.cpython-310-darwin.so +0 -0
  35. qlc/py/scatter_plots.cpython-310-darwin.so +0 -0
  36. qlc/py/stations.cpython-310-darwin.so +0 -0
  37. qlc/py/statistics.cpython-310-darwin.so +0 -0
  38. qlc/py/style.cpython-310-darwin.so +0 -0
  39. qlc/py/timeseries_plots.cpython-310-darwin.so +0 -0
  40. qlc/py/utils.cpython-310-darwin.so +0 -0
  41. qlc/py/version.cpython-310-darwin.so +0 -0
  42. qlc/sh/qlc_A1.sh +29 -11
  43. qlc/sh/qlc_B1a.sh +1 -18
  44. qlc/sh/qlc_B2.sh +8 -1
  45. qlc/sh/qlc_C5.sh +19 -30
  46. qlc/sh/qlc_D1.sh +291 -51
  47. qlc/sh/qlc_Z1.sh +6 -6
  48. qlc/sh/qlc_batch.sh +61 -0
  49. qlc/sh/qlc_common_functions.sh +17 -29
  50. qlc/sh/qlc_main.sh +32 -26
  51. qlc/sh/tex_template/beamercolorthemeCAMS2_35.sty +51 -0
  52. qlc/sh/tex_template/beamerfontthemeCAMS2_35.sty +166 -0
  53. qlc/sh/tex_template/beamerthemeCAMS2_35.sty +25 -0
  54. qlc/sh/tex_template/subcaption.sty +170 -0
  55. qlc/sh/tex_template/template.tex +109 -0
  56. rc_qlc-0.3.25.dist-info/METADATA +178 -0
  57. rc_qlc-0.3.25.dist-info/RECORD +102 -0
  58. qlc/config/json/qlc_config_example_1a_all-obs.json +0 -237
  59. qlc/config/json/qlc_config_example_1b_all-mod.json +0 -353
  60. qlc/config/json/qlc_config_example_1c_all-coll.json +0 -266
  61. qlc/config/json/qlc_config_example_2a_all-obs.json +0 -237
  62. qlc/config/json/qlc_config_example_2b_all-mod.json +0 -353
  63. qlc/config/json/qlc_config_example_2c_all-coll.json +0 -265
  64. qlc/config/json/qlc_config_example_3a-us_obs.json +0 -82
  65. qlc/config/json/qlc_config_example_3b-us_mod.json +0 -122
  66. qlc/config/json/qlc_config_example_3c-us_coll.json +0 -46
  67. qlc/config/json/qlc_config_example_4a_eu-obs.json +0 -41
  68. qlc/config/json/qlc_config_example_4b_eu-mod.json +0 -122
  69. qlc/config/json/qlc_config_example_4c_eu-coll.json +0 -45
  70. qlc/config/qlc_cams.conf +0 -26
  71. qlc/config/qlc_test.conf +0 -26
  72. qlc/config/qlc_tex.conf +0 -107
  73. qlc/examples/cams_case_1/config/json/qlc_config.json +0 -41
  74. qlc/examples/cams_case_1/config/nml/mars_B1_pl.nml +0 -19
  75. qlc/examples/cams_case_1/mod/b2ro/2018/b2ro_20181215-20181231_A3_sfc.grb +0 -0
  76. qlc/examples/cams_case_1/mod/iqi9/2018/iqi9_20181215-20181231_A3_sfc.grb +0 -0
  77. qlc/sh/qlc_start.sh +0 -23
  78. qlc/sh/qlc_start_batch.sh +0 -46
  79. rc_qlc-0.3.24.dist-info/METADATA +0 -142
  80. rc_qlc-0.3.24.dist-info/RECORD +0 -113
  81. {rc_qlc-0.3.24.dist-info → rc_qlc-0.3.25.dist-info}/WHEEL +0 -0
  82. {rc_qlc-0.3.24.dist-info → rc_qlc-0.3.25.dist-info}/entry_points.txt +0 -0
  83. {rc_qlc-0.3.24.dist-info → rc_qlc-0.3.25.dist-info}/licenses/LICENSE +0 -0
  84. {rc_qlc-0.3.24.dist-info → rc_qlc-0.3.25.dist-info}/top_level.txt +0 -0
@@ -1,20 +1,31 @@
1
1
  #----------------------------------------------------------------------
2
- #----------------------- QLC version to be used -------------------
3
- QLC_VERSION="v03"
4
- #----------------------- Path definitions -------------------------
5
- SCRIPTS_PATH="$HOME/../cysm/bin_public/qlc_src_$QLC_VERSION"
2
+ #----------------------- QLC version to be used -----------------------
3
+ QLC_VERSION="VERSION"
4
+ #----------------------------------------------------------------------
5
+ #----------------------- Path definitions -----------------------------
6
+ #----------------------------------------------------------------------
6
7
  QLC_HOME="$HOME/qlc"
7
- QLC_DIRECTORY="${QLC_HOME}_$QLC_VERSION"
8
- WORKING_DIRECTORY="$SCRATCH/qlc"
9
- MARS_RETRIEVAL_DIRECTORY="$SCRATCH/qlc/Results"
10
- ANALYSIS_DIRECTORY="$HPCPERM/qlc/Analysis"
11
- PLOTS_DIRECTORY="$PERM/qlc/Plots"
12
- TEX_DIRECTORY="$PERM/qlc/Presentations"
13
- #----------------------- PDF presentation and info -------------
14
- TEAM_PREFIX="CAMS2_35"
8
+ DATA_PATH="${QLC_HOME}/data"
9
+ SCRIPTS_PATH="${QLC_HOME}/bin"
10
+ WORKING_DIRECTORY="${QLC_HOME}"
11
+ MARS_RETRIEVAL_DIRECTORY="${QLC_HOME}/Results"
12
+ ANALYSIS_DIRECTORY="${QLC_HOME}/Analysis"
13
+ PLOTS_DIRECTORY="${QLC_HOME}/Plots"
14
+ TEX_DIRECTORY="${QLC_HOME}/Presentations"
15
+ #----------------------------------------------------------------------
16
+ #----------------------- PDF presentation and info -------------------
17
+ #----------------------------------------------------------------------
18
+ TEAM_PREFIX="CAMS" # without underscore
15
19
  EVALUATION_PREFIX="EVAL"
16
20
  MODEL_RESOLUTION="T255L137"
17
21
  TIME_RESOLUTION="03hh"
22
+ #----------------------------------------------------------------------
23
+ # User specific configuration file
24
+ CONFIG_DIR="${QLC_HOME}/config"
25
+ CONFIG_TEX="$CONFIG_DIR/qlc_tex.conf"
26
+ #----------------------------------------------------------------------
27
+ #----------------------- PDF presentation and info -------------------
28
+ #----------------------------------------------------------------------
18
29
  #PLOTEXTENSION="pdf"
19
30
  PLOTEXTENSION="png"
20
31
  #----------------------- Run-time definitions -------------------------
@@ -23,15 +34,15 @@ PLOTEXTENSION="png"
23
34
  #- (a) QLC unified data analysis and plotting (entries optional)
24
35
  #----------------------------------------------------------------------
25
36
  #SUBSCRIPT_NAMES=("A1" "B1" "B2" "C1" "D1" "E1" "F1" "G1" "Z1")
26
- #SUBSCRIPT_NAMES=("C5" "Z1")
27
- SUBSCRIPT_NAMES=("A1" "B1a" "B2" "C5" "Z1")
37
+ SUBSCRIPT_NAMES=("A1" "B1a" "B2" "C5" "D1" "Z1")
38
+ #SUBSCRIPT_NAMES=("D1" "Z1")
28
39
  #----------------------------------------------------------------------
29
40
  #- (b) QLC unified mars data retrieval (SUBSCRIPT_NAME, A1, A2, A3, ...)
30
41
  #- Mars retrievals for namelist : nml/mars_A2.nml, nml/mars_B2.nml, ...)
31
42
  #----------------------------------------------------------------------
32
- #- MARS_RETRIEVALS=("A2_sfc" "B2_pl" "C2_pl" "C3_ml" "D" "E" "F" "I")
33
- #- O3, NH3 and NH4_as
34
- MARS_RETRIEVALS=("A3_sfc" "B1_pl" "C1_pl")
43
+ #- MARS_RETRIEVALS=("A3_sfc" "B1_pl" "C1_pl" "C1_ml" "D" "E" "F" "I")
44
+ #- "NH3" "NH4-as"
45
+ MARS_RETRIEVALS=("B1_pl" "C1_sfc" )
35
46
  #----------------------------------------------------------------------
36
47
  #- un/comment MARS_RETRIEVALS (choose one or combine contents into one)
37
48
  #- The MARS_RETRIEVALS mapping is required for subscript processing (a)
@@ -57,6 +68,14 @@ param_A1_sfc=("73.210")
57
68
  ncvar_A1_sfc=("var73")
58
69
  myvar_A1_sfc=("PM25")
59
70
  #----------------------------------------------------------------------
71
+ param_B1_sfc=("19.217")
72
+ ncvar_B1_sfc=("nh3")
73
+ myvar_B1_sfc=("NH3")
74
+ #----------------------------------------------------------------------
75
+ param_C1_sfc=("35.212")
76
+ ncvar_C1_sfc=("param35.212.192")
77
+ myvar_C1_sfc=("NH4_as")
78
+ #----------------------------------------------------------------------
60
79
  param_A2_sfc=("207.210" "72.210" "73.210" "74.210")
61
80
  ncvar_A2_sfc=("var207" "var72" "var73" "var74")
62
81
  myvar_A2_sfc=("AOD" "PM1" "PM25" "PM10")
@@ -119,4 +138,47 @@ param_I=("130" "133" "157")
119
138
  ncvar_I=("var130" "var133" "var157")
120
139
  myvar_I=("T" "SH" "RH")
121
140
  #----------------------------------------------------------------------
122
- #----------------------------------------------------------------------
141
+ #- 3. Resolution depending definitions (to be processed by subscripts)
142
+ #----------------------------------------------------------------------
143
+ UTLS="4:5" # 100:300 hPa (selected model levels)
144
+ #----------------------------------------------------------------------
145
+ # Additional settings for qlc-py execution via qlc_D1.sh
146
+ # These are required to generate the correct JSON configuration.
147
+ #----------------------------------------------------------------------
148
+ # Full path to the station list file.
149
+ # Leave empty if not used.
150
+ STATION_FILE="${QLC_HOME}/obs/data/ebas_station-locations.csv"
151
+ # Path to the root directory containing observation data.
152
+ # The install script links the example data to ../obs from the test/bin directory.
153
+ OBS_DATA_PATH="${QLC_HOME}/obs/data/ver0d"
154
+ # Type of observation dataset (e.g., ebas_daily).
155
+ OBS_DATASET_TYPE="ebas_daily"
156
+ # Version of the observation dataset (e.g., latest).
157
+ OBS_DATASET_VERSION="latest"
158
+ # Name of the model being evaluated.
159
+ MODEL="IFS"
160
+ # Comma-separated list of labels for the experiments, in the same order.
161
+ # Used for plot legends.
162
+ EXP_LABELS="E4C,REF"
163
+ # The geographical region for plotting.
164
+ REGION="EU"
165
+ # The model level to be used for analysis.
166
+ # A single integer might be provided (e.g., 9).
167
+ # If unset, the Python code will default to the surface level for all variables.
168
+ MODEL_LEVEL=""
169
+ # The specific plot type to generate.
170
+ # Leave empty for default behavior.
171
+ PLOT_TYPE=""
172
+ # The time averaging to be applied (e.g., daily, monthly).
173
+ TIME_AVERAGE="daily"
174
+ # The radius in degrees to search for model points around a station.
175
+ STATION_RADIUS_DEG=0.5
176
+ # How many stations to group into a single plot.
177
+ STATION_PLOT_GROUP_SIZE=5
178
+ # Enable or disable multiprocessing.
179
+ MULTIPROCESSING=false
180
+ # Number of threads to use if multiprocessing is enabled.
181
+ N_THREADS=4
182
+ # Enable or disable debug mode.
183
+ DEBUG=false
184
+ #----------------------------------------------------------------------
qlc/doc/README.md CHANGED
@@ -1,7 +1,8 @@
1
- # Quick Look Content (QLC): Model–Observation Comparison Suite for Use with CAMS
1
+ # Quick Look Content (QLC): An Automated Model–Observation Comparison Suite
2
2
 
3
- `qlc` is a single command-line tool for model–observation comparisons with automated figures and summaries,
4
- designed to support climate and air quality monitoring and specifically adapted for use with CAMS (Copernicus Atmospheric Monitoring Service) datasets.
3
+ **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.
4
+
5
+ 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.
5
6
 
6
7
  | Package | Status |
7
8
  |---------|--------|
@@ -9,54 +10,117 @@ designed to support climate and air quality monitoring and specifically adapted
9
10
 
10
11
  ---
11
12
 
12
- ## Features
13
+ ## What's New in v0.3.25
13
14
 
14
- - Side-by-side evaluation of observational and modelled data
15
- - Fully scriptable and automated post-processing chain
16
- - Modular structure using shell + Python + Cython
17
- - Generates publication-ready figures and LaTeX integration
18
- - Supports NetCDF and CSV time series formats
19
- - Pre-configured CAMS observational interface via JSON
15
+ This version introduces a completely new, high-performance Python processing engine and a more robust installation system.
16
+ - **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.
17
+ - **Standalone `qlc-py` Tool**: In addition to being used by the main `qlc` pipeline, `qlc-py` can be run as a standalone tool for rapid, iterative analysis using a simple JSON configuration.
18
+ - **New `cams` Installation Mode**: A dedicated installation mode for operational CAMS environments that automatically links to standard data directories.
19
+ - **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 (`test` vs. `cams`).
20
+ - **Dynamic Variable Discovery**: The shell pipeline now automatically discovers which variables to process based on the available NetCDF files, simplifying configuration.
21
+ - **Flexible Model Level Handling**: The Python engine can intelligently select the correct vertical model level for each variable or use a user-defined default.
20
22
 
21
23
  ---
22
24
 
23
- ## User Installation
25
+ ## Core Features
26
+
27
+ - **Automated End-to-End Workflow**: A single `qlc` command can drive the entire pipeline: MARS data retrieval, data processing, statistical analysis, plotting, and final PDF report generation.
28
+ - **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.
29
+ - **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.
30
+ - **Flexible Installation Modes**: The `qlc-install` script supports multiple, co-existing modes:
31
+ - `--mode test`: A standalone mode with bundled example data, perfect for new users. All data is stored locally in `$HOME/qlc_v<version>/test/`.
32
+ - `--mode cams`: An operational mode that links to standard CAMS data directories and uses environment variables like `$SCRATCH` and `$PERM` for data storage in shared HPC environments.
33
+ - **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.
34
+
35
+ ---
24
36
 
25
- Use one of the following install modes:
37
+ ## Quickstart
26
38
 
39
+ **1. Install the Package**
27
40
  ```bash
28
- # Option 1: CAMS (default data links + config)
29
- pip install rc-qlc && qlc-install --cams
41
+ pip install rc-qlc
42
+ ```
30
43
 
31
- # Option 2: Local test mode with embedded examples
32
- pip install rc-qlc && qlc-install --test
44
+ **2. Set Up the Test Environment**
45
+ 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.
46
+ ```bash
47
+ qlc-install --mode test
48
+ ```
33
49
 
34
- # Option 3: Custom interactive mode
35
- pip install rc-qlc && qlc-install --interactive="./path/to/qlc_user.conf"
50
+ **3. Run the Full Pipeline**
51
+ 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`.
52
+ ```bash
53
+ cd $(readlink -f $HOME/qlc)
54
+ qlc b2ro b2rn 2018-12-01 2018-12-21
36
55
  ```
37
56
 
38
57
  ---
39
58
 
40
- ## Example Use Cases
59
+ ## Installation and Configuration
60
+
61
+ ### Standard Installation
62
+
63
+ QLC is installed from PyPI. After the `pip install`, you **must** run `qlc-install` to set up the necessary local directory structure.
41
64
 
42
- ### Run the full shell pipeline (retrieval, processing, plotting):
43
65
  ```bash
44
- qlc
66
+ # For a standalone test environment with example data
67
+ pip install rc-qlc && qlc-install --mode test
68
+
69
+ # For an operational CAMS environment
70
+ pip install rc-qlc && qlc-install --mode cams
45
71
  ```
46
72
 
47
- ### Run just the observation/model comparison in Python:
73
+ ### Installation in Restricted Environments (HPC/ATOS)
74
+
75
+ 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.
76
+
77
+ **1. Update your PATH (Recommended)**
78
+ 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.
79
+ ```bash
80
+ # Example for bash shell
81
+ echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
82
+ source ~/.bashrc
83
+ ```
84
+
85
+ **2. Load the Correct Python Module**
86
+ Ensure you are using a compatible Python version.
48
87
  ```bash
49
- qlc-py
88
+ module load python3/3.10.10-01
50
89
  ```
51
90
 
52
- ### Submit via batch system (e.g., SLURM or LSF):
91
+ **3. Install and Run**
92
+ Now you can install as normal.
53
93
  ```bash
54
- sqlc
94
+ pip install rc-qlc && qlc-install --mode test
55
95
  ```
96
+ If you chose not to update your `PATH`, you must call the installer script by its full path:
97
+ ```bash
98
+ pip install rc-qlc && $HOME/.local/bin/qlc-install --mode test
99
+ ```
100
+
101
+ ### Where Files Are Installed
102
+ - **Python Package Source**: `$HOME/.local/lib/python3.10/site-packages/qlc/`
103
+ - **Executable Scripts**: `$HOME/.local/bin/`
104
+ - **QLC Runtime Environment**: `$HOME/qlc_v<version>/<mode>`
105
+ - **Stable Symlink**: `$HOME/qlc` (points to the latest installed runtime environment)
106
+
107
+
108
+ ### Configuration Structure
109
+
110
+ 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.
111
+
112
+ For example, in `test` mode:
113
+ - `$HOME/qlc/Results` (the path in your config) -> is a symlink to
114
+ - `$HOME/qlc_v<version>/test/Results` -> which is a symlink to
115
+ - `$HOME/qlc_v<version>/test/data/Results` -> which is a real directory.
116
+
117
+ 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.
118
+
119
+ ---
56
120
 
57
121
  ## Developer Setup
58
122
 
59
- To work on the `qlc` source code, clone the repository and install it in "editable" mode. This will install all dependencies and link the `qlc` command to your source tree.
123
+ To work on the `qlc` source code, clone the repository and install it in "editable" mode.
60
124
 
61
125
  ```bash
62
126
  # 1. Clone the repository
@@ -67,43 +131,17 @@ cd qlc
67
131
  python3 -m venv .venv
68
132
  source .venv/bin/activate
69
133
 
70
- # 3. Install in editable mode
134
+ # 3. Install in editable mode (this compiles the Cython modules)
71
135
  pip install -e .
72
- ```
73
136
 
74
- ---
75
-
76
- ## Configuration Structure
77
-
78
- The installer script creates the following structure in your home directory:
137
+ # 4. Set up the test environment for development
138
+ qlc-install --mode test
79
139
  ```
80
- $HOME/qlc_v<version>/
81
- ├── test/ # Root directory for the 'test' installation mode
82
- │ ├── bin/ # Symlinks to shell scripts
83
- │ ├── doc/ # Symlinks to documentation
84
- │ ├── config/ # Active config files (e.g., qlc.conf)
85
- │ ├── examples/ # Test input and output files
86
- │ ├── obs/, mod/, ... # Runtime directories
87
- │ └── VERSION.json # Tracks install mode and version
88
- └── cams/ # Root for 'cams' mode, etc.
89
- ```
90
- A symlink `$HOME/qlc` is also created to point to the active installation. You can edit `$HOME/qlc/config/qlc.conf` to modify runtime behavior.
91
140
 
92
- ---
93
-
94
- ## Documentation
95
-
96
- - All core logic is contained in the `qlc` package.
97
- - Shell scripts for driving the pipeline are in `qlc/sh/`.
98
- - The core Python/Cython logic is in `qlc/py/*.py` and is compiled to binary modules for performance.
99
-
100
- ---
101
-
102
- ## Developer Notes
103
-
104
- - Python source files (`.py`) are compiled to binary modules (`.so`) using Cython at install time.
105
- - The package version is managed in `pyproject.toml`.
106
- - The `qlc-install` script sets up the runtime environment by creating directories and symlinks.
141
+ 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.
142
+ ```bash
143
+ qlc-install --mode interactive --config /path/to/your/custom_qlc.conf
144
+ ```
107
145
 
108
146
  ---
109
147
 
@@ -111,6 +149,4 @@ A symlink `$HOME/qlc` is also created to point to the active installation. You c
111
149
 
112
150
  © ResearchConcepts io GmbH
113
151
  Contact: [contact@researchconcepts.io](mailto:contact@researchconcepts.io)
114
- MIT-compatible, source-restricted under private release until publication.
115
-
116
- ---
152
+ MIT-compatible, source-restricted under private release until publication.
qlc/doc/USAGE.md CHANGED
@@ -1,58 +1,97 @@
1
1
  # QLC Usage Guide
2
2
 
3
- ## Installed CLI Tools
3
+ This guide provides detailed instructions on how to use the QLC command-line tools and configure the workflow.
4
4
 
5
- Once installed, QLC provides the following command-line entry points:
5
+ ---
6
6
 
7
- ### `qlc`
8
- Runs the full shell-based QLC pipeline (retrieval, processing, plotting).
7
+ ## Installed CLI Tools
9
8
 
10
- ### `qlc-py`
11
- Runs the standalone Python-based observation–model comparison.
9
+ Once installed, QLC provides the following command-line entry points:
12
10
 
13
- ### `sqlc`
14
- Submits a QLC run as a batch job (e.g., SLURM, LSF).
11
+ - **`qlc`**: The main driver. Runs the full shell-based QLC pipeline, which now integrates the `qlc-py` engine for all data processing and plotting. Use this for standard, end-to-end model evaluation runs.
12
+ - **`qlc-py`**: The standalone Python engine. Can be run directly with a JSON configuration file for rapid, iterative analysis without re-running the entire shell pipeline.
13
+ - **`sqlc`**: A wrapper to submit a `qlc` run as a batch job to a scheduling system like SLURM.
15
14
 
16
15
  ---
17
16
 
18
- ## PyPI Installation
17
+ ## Running QLC
19
18
 
20
- To install `rc-qlc` from PyPI and set up the local environment, use the following two-step command.
19
+ After installation (`qlc-install --mode test` or `--mode cams`), you can immediately run the main drivers. It's recommended to run `qlc` from within the active installation directory.
21
20
 
22
- ### CAMS Mode
23
- For users connected to the CAMS data infrastructure.
24
21
  ```bash
25
- pip install rc-qlc && qlc-install --cams
22
+ # Navigate to the active QLC directory
23
+ cd $(readlink -f $HOME/qlc)
26
24
  ```
27
25
 
28
- ### Test Mode
29
- For a standalone test using the bundled example data.
26
+ ### `qlc`: The Main Pipeline
27
+
28
+ This is the standard workflow. It performs data retrieval (if needed), processes model and observation data, and generates all plots and a final PDF report.
29
+
30
+ **Syntax**
31
+ ```
32
+ qlc <exp1> <exp2> <start_date> <end_date> [mars]
33
+ ```
34
+
35
+ **Examples**
30
36
  ```bash
31
- pip install rc-qlc && qlc-install --test
37
+ # Run a comparison of experiments b2ro and b2rn for the first three weeks of Dec 2018
38
+ # This uses the example data included in the 'test' installation.
39
+ qlc b2ro b2rn 2018-12-01 2018-12-21
40
+
41
+ # Run the same comparison, but first retrieve the data from MARS
42
+ qlc b2ro b2rn 2018-12-01 2018-12-21 mars
43
+
44
+ # Run without options to see the help message
45
+ qlc
32
46
  ```
33
47
 
34
- ---
48
+ ### `qlc-py`: Standalone Python Engine
35
49
 
36
- ## Local Wheel Installation
50
+ Use this tool for rapid data analysis and plotting without the overhead of the full shell pipeline. It is controlled by a JSON configuration file. By default, it uses the configuration file located at `$HOME/qlc/config/json/qlc_config.json`, but you can provide your own.
37
51
 
38
- If you have a wheel file (`.whl`), you can install it directly.
52
+ This is useful for developers or for regenerating plots with different settings after an initial `qlc` run has completed.
39
53
 
54
+ **Examples**
40
55
  ```bash
41
- # Example for a local wheel file
42
- pip install ./path/to/your/rc-qlc-0.3.21-....whl
43
- qlc-install --test
56
+ # Run with the default configuration
57
+ # This can be used to re-run the Python analysis after a 'qlc' run
58
+ qlc-py
59
+
60
+ # Run with a specific, user-defined configuration file
61
+ qlc-py --config /path/to/my_config.json
44
62
  ```
45
63
 
46
- ---
64
+ ### `sqlc`: Submitting a Batch Job
47
65
 
48
- ## Running QLC in Test Mode
66
+ For long-running jobs, you can submit the QLC pipeline to a batch scheduling system like SLURM.
49
67
 
50
- After installing in test mode, you can immediately run the main drivers:
68
+ **Examples**
51
69
  ```bash
52
- # Run the full shell pipeline with example data
53
- qlc
70
+ # Submit a job with default parameters from qlc.conf
71
+ sqlc
54
72
 
55
- # Run only the Python processing part
56
- qlc-py
73
+ # Submit with specific experiments and dates, including MARS retrieval
74
+ sqlc b2ro b2rn 2018-12-01 2018-12-21 mars
57
75
  ```
58
76
 
77
+ ---
78
+
79
+ ## Python Workflow and Configuration
80
+
81
+ The new Python-based workflow is integrated into the main `qlc` pipeline via the `qlc_D1.sh` script. This script dynamically discovers available variables (e.g., `NH3`, `NH4_as`) from your NetCDF files in the `Analysis` directory. It then generates a temporary JSON configuration file and passes it to `qlc-py` for processing.
82
+
83
+ You can customize this workflow by editing the variables in your main configuration file: **`$HOME/qlc/config/qlc.conf`**.
84
+
85
+ ### Key Configuration Variables
86
+
87
+ | Variable | Description | Example |
88
+ | --- | --- | --- |
89
+ | `STATION_FILE` | Path to the CSV file containing station metadata (ID, name, lat, lon). | `"${QLC_HOME}/obs/data/ebas_station-locations.csv"` |
90
+ | `OBS_DATA_PATH` | Root path to the observation NetCDF files. | `"${QLC_HOME}/obs/data/ver0d"` |
91
+ | `OBS_DATASET_TYPE`| The specific observation dataset to use (e.g., `ebas_hourly`, `ebas_daily`, ...). | `"ebas_daily"` |
92
+ | `MODEL_LEVEL` | The model level index to extract. If left empty (`""`), the code intelligently defaults to the highest index (closest to the surface). | 9 |
93
+ | `TIME_AVERAGE` | The time averaging to apply to the data (e.g., `daily`, `monthly`, `yearly`, ...). | `"daily"` |
94
+ | `REGION` | The geographical region to focus on for plots and analysis (e.g., `"EU"`, `"US"`, `"ASIA"` , `"Globe"`, ...). | `"EU"` |
95
+ | `EXP_LABELS` | Comma-separated labels for experiments, used in plot legends. Must match the order of experiments passed to `qlc`. | `"MyExp,MyREF"` |
96
+ | `PLOTEXTENSION` | The file format for the output plots (e.g., `pdf`, `png`, ...). | `"png"` |
97
+