• Templates Library Overview
Section 01: Individual Chemicals
• Nitrogen & Phosphorus Templates
• Dissolved Oxygen & Carbon
• Phytoplankton/Algae Dynamics
• Plant Uptake Module
• Emerging Contaminants
• Groundwater Age Tracking
• New Advanced Templates
Section 02: Popular Model Frameworks
• SWAT, QUAL2K, HYPE, WASP8
Section 03: Thermodynamic Templates
• FT Factor Templates
• Redox Ladder
Section 04: PHREEQC Templates
• Equilibrium Templates
• Kinetic Templates (.pqi)
• Template Summary
JSON-based kinetic reaction frameworks
Equilibrium + kinetic geochemistry (.pqi)
supporting_scripts/Model_Config/config_support_lib/BGC_templates/
Basic 3-pool nitrogen cycle
Complete N cycle with advanced processes
Basic 3-pool phosphorus cycle
Full P cycle with redox control
Complete DO budget with 12 transformations
DOC/POC cycling
// Reaeration example (O'Connor-Dobbins) "kinetics": [ "(ka_20 * 1.024^(T-20)) * (DO_sat - DO)", "mg-O2/L/day" ]
WASP8-style eutrophication model — 11 transformations
| Process | Description |
|---|---|
| Growth | Light (Steele) + Nutrient (MM) |
| N uptake | Preferential NH₄, then NO₃ |
| P uptake | Redfield C:N:P = 106:16:1 |
| Respiration | Temperature-dependent |
| Mortality | Non-predatory death |
| Settling | Gravitational sinking |
| Grazing | Zooplankton (Ivlev model) |
// Steele photoinhibition model "kinetics": [ "mu_max * PHYTO * (I/I_opt) * exp(1 - I/I_opt) * (TIN/(Ks_N + TIN)) * (PO4_P/(Ks_P + PO4_P)) * theta^(T - 20)" ] // Ivlev grazing formulation "kinetics": [ "g_max * ZOO * (1 - exp(-lambda * PHYTO))" ]
SWAT/HYPE-style vegetation cycling — 3 frameworks, 15 transformations
// NO3 uptake with seasonal factor "kinetics": [ "k_uptake_no3 * NO3_N / (Ks_N + NO3_N + NH4_N) * f_growth * f_temp * f_moisture" ] // Litter N mineralization "kinetics": [ "k_litter_N * LITTER_N * theta^(T - 293)" ]
Lumped N and P uptake for screening models
Micropollutants framework — 6 cycling frameworks, 32 transformations
| Framework | Compounds | Transforms |
|---|---|---|
| PHARMACEUTICALS | Antibiotics, analgesics, hormones | 8 |
| PPCPS | Fragrances, UV filters, triclosan | 6 |
| PFAS | PFOA, PFOS, GenX | 5 |
| MICROPLASTICS | Fibers, fragments, beads | 6 |
| ENDOCRINE_DISRUPTORS | Estrogens, BPA | 4 |
| EMERGING_SIMPLE | Generic screening | 3 |
// PFAS - extremely persistent "kinetics": [ "k_sorp_pfoa * PFAS_PFOA * (1 - PFAS_PFOA/Smax)" ] // Only sorption - no biodegradation! // Microplastic settling "kinetics": [ "v_settle * MP_fiber / depth" ]
Environmental tracers for residence time — 7 frameworks
| Tracer | Half-life | Age Range |
|---|---|---|
| ³H-³He (Tritium) | 12.32 yr | 0-50 years |
| CFC-11, CFC-12 | — | 1940s-1990s |
| SF₆ | — | Post-1990 |
| ¹⁴C | 5,730 yr | 100-40,000 yr |
// Tritium decay: 3H -> 3He "kinetics": [ "lambda_H3 * TRITIUM" ] // lambda = ln(2)/12.32yr = 0.0562/yr // 3H-3He apparent age // Age = ln(1 + 3He_trit/3H) / lambda // Carbon-14 age "kinetics": [ "lambda_C14 * CARBON14" ] // Age = -8267 × ln(14C/100)
Multi-G OM, redox cascade, P/N cycling, CH₄
N/P/TSS removal, k-C* design model
NO₃ leaching, P transport, snowmelt flush
Carbonate system, ALK budget, AMD
Cu, Zn, Pb, Cd, Hg speciation and sorption
E. coli, fecal coliforms, virus decay
Generic pesticide fate with hydrolysis
Dissolved silica for diatom modeling
Fe/Mn redox cycling in sediments
CHEMICAL_SPECIES definitions
Complete SWAT-style N/P/C cycling
Classic stream water quality
Nordic-style large-scale modeling
Lake/estuary eutrophication
| Template | ΔG° (kJ/mol) |
|---|---|
| aerobic_respiration.json | −125 |
| nitrification.json | −119 to −79 |
| denitrification_thermodynamic.json | −119 |
| anammox.json | −357 |
| manganese_reduction.json | −95 |
| iron_reduction.json | −50 |
| sulfate_reduction.json | −25 |
| methanogenesis.json | −20 |
Complete redox cascade — 13 reactions
Combines all TEAPs (Terminal Electron Accepting Processes) with automatic FT enforcement
// F_T auto-enforces redox sequence "kinetics": [ "k * X * (NO3/(Km+NO3)) * (DOC/(Km_DOC+DOC)) * (1 - exp(-((119-45)/(2*R*(T+273)))))" ] // ^^^^^ F_T term ^^^^^^
| Category | Templates | Key Features | Status |
|---|---|---|---|
| Nutrients | nitrogen, phosphorus (simple/full) | N & P cycling, plant uptake, redox | Stable |
| Dissolved Oxygen | dissolved_oxygen | 12 transforms, 4 reaeration formulas | v2.0 |
| Algae | phytoplankton_algae | Steele + MM, zooplankton, Chla | v2.0 |
| Vegetation | plant_uptake | 3 frameworks, riparian buffer | v2.0 |
| Micropollutants | emerging_contaminants | PFAS, PPCPs, microplastics, EDCs | v2.0 |
| Popular Models | SWAT, QUAL2K, HYPE, WASP8 | Complete model frameworks | Stable |
| Thermodynamic | 10 redox templates + diagenesis | FT factor, automatic ladder | Stable |
| Groundwater Age | groundwater_age | ³H-³He, ¹⁴C, CFCs, SF₆ tracers | v2.0 |
| Sediment Diagenesis | sediment_diagenesis | Multi-G OM, redox cascade, P/N cycling | v2.0 |
| Wetland/BMP | wetland_processing | N/P/TSS removal, k-C* model | v2.0 |
| Tile Drainage | tile_drainage | NO₃ leaching, P transport, snowmelt | v2.0 |
| pH/Alkalinity | pH_alkalinity | Carbonate system, ALK budget, AMD | v2.0 |
| PHREEQC | 4 equilibrium + 9 kinetic | Full geochemistry + bio processes | Mixed |