Model Comparison Results: Python vs Excel QUAL2K Accuracy
This page presents the actual validation results comparing the Python QUAL2K engine against the legacy EPA QUAL2K Excel/VBA model. All comparisons use identical input data extracted cell-by-cell from the original Excel workbooks.
Ready to model your river?
Try the QUAL2K prediction engine with your own data
Launch Prediction EngineModel Comparison Summary
Paraluz Model (Brazil)
Basic 2-reach model with headwater-only forcing. Tests fundamental hydraulics and DO/BOD decay.
Paraluz: Hydraulics comparison
| Parameter | Reach | Excel | Python | % Diff |
|---|---|---|---|---|
| Velocity (m/s) | PR1 | 0.198 | 0.198 | 0.00% |
| Velocity (m/s) | VPR1 | 0.177 | 0.177 | 0.00% |
| Depth (m) | PR1 | 0.304 | 0.304 | 0.00% |
| Depth (m) | VPR1 | 0.322 | 0.322 | 0.00% |
| Travel time (d) | PR1 | 0.0135 | 0.0135 | 0.00% |
| Travel time (d) | VPR1 | 0.0063 | 0.0063 | 0.00% |
Paraluz: Water quality comparison
| Parameter | Reach | Excel | Python | % Diff |
|---|---|---|---|---|
| DO (mg/L) | PR1 | 7.82 | 7.82 | < 0.01% |
| DO (mg/L) | VPR1 | 7.79 | 7.79 | < 0.01% |
| CBOD fast (mg/L) | PR1 | 3.98 | 3.97 | 0.25% |
| CBOD fast (mg/L) | VPR1 | 3.95 | 3.95 | < 0.01% |
| NH₄ (μg/L) | PR1 | 150.0 | 149.8 | 0.13% |
| NO₃ (μg/L) | PR1 | 600.0 | 600.0 | 0.00% |
Bolder Model (Colorado, USA)
50-reach model with point sources. Stress-tests the engine with many computational elements.
Bolder: Key variable comparison (selected reaches)
| Parameter | Reach 1 | Reach 25 | Reach 50 | Max % Diff |
|---|---|---|---|---|
| DO (mg/L) | 9.12 / 9.12 | 8.45 / 8.44 | 7.89 / 7.88 | 0.13% |
| CBOD fast (mg/L) | 2.10 / 2.10 | 1.85 / 1.84 | 1.62 / 1.62 | 0.54% |
| Velocity (m/s) | 0.453 / 0.453 | 0.512 / 0.512 | 0.487 / 0.487 | 0.00% |
| NH₄ (μg/L) | 320 / 320 | 245 / 244 | 185 / 184 | 0.54% |
| NO₃ (μg/L) | 1100 / 1100 | 1175 / 1176 | 1230 / 1231 | 0.08% |
| Pathogens (cfu) | 5000 / 5000 | 2100 / 2098 | 890 / 889 | 0.11% |
Rio Cauca (Colombia)
17-reach tropical river with nitrification-dominant DO dynamics and diffuse sources.
Rio Cauca: DO and nitrogen comparison
| Parameter | Headwater | Mid-reach (8) | Terminus (17) | Max % Diff |
|---|---|---|---|---|
| DO (mg/L) | 7.50 / 7.50 | 4.23 / 4.22 | 6.15 / 6.14 | 0.24% |
| CBOD fast (mg/L) | 8.60 / 8.60 | 4.12 / 4.11 | 2.05 / 2.04 | 0.49% |
| NH₄ (μg/L) | 2450 / 2450 | 1680 / 1676 | 890 / 887 | 0.34% |
| NO₃ (μg/L) | 3200 / 3200 | 3890 / 3895 | 4350 / 4356 | 0.14% |
Rio Meléndez (Colombia)
8-reach urban river receiving WWTP effluent. Used for auto-calibration validation.
Rio Meléndez: Full constituent comparison
| Parameter | Excel (Reach 8) | Python (Reach 8) | % Diff |
|---|---|---|---|
| DO (mg/L) | 6.89 | 6.88 | 0.15% |
| CBOD fast (mg/L) | 5.12 | 5.10 | 0.39% |
| CBOD slow (mg/L) | 2.34 | 2.33 | 0.43% |
| NH₄ (μg/L) | 890 | 887 | 0.34% |
| NO₃ (μg/L) | 2150 | 2154 | 0.19% |
| Org P (μg/L) | 120 | 119 | 0.83% |
| Inorg P (μg/L) | 450 | 449 | 0.22% |
| Pathogens (cfu) | 12500 | 12480 | 0.16% |
| Temperature (°C) | 22.5 | 22.5 | 0.00% |
Comparison Error Distribution
Summary of maximum relative errors across all models
| Variable | Paraluz | Bolder | Rio Cauca | Rio Meléndez | Verdict |
|---|---|---|---|---|---|
| DO | < 0.01% | 0.13% | 0.24% | 0.15% | ✅ PASS |
| CBOD (fast) | 0.25% | 0.54% | 0.49% | 0.39% | ✅ PASS |
| CBOD (slow) | — | 0.31% | 0.22% | 0.43% | ✅ PASS |
| NH₄ | 0.13% | 0.54% | 0.34% | 0.34% | ✅ PASS |
| NO₃ | 0.00% | 0.08% | 0.14% | 0.19% | ✅ PASS |
| Hydraulics | 0.00% | 0.00% | 0.00% | 0.00% | ✅ PASS |
| Pathogens | — | 0.11% | — | 0.16% | ✅ PASS |
| Temperature | 0.00% | 0.00% | 0.00% | 0.00% | ✅ PASS |