Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e408000
Switches events to flux model, ensures smoke test output has not changed
Alomir Aug 25, 2025
3ef5df4
Updates to keep output unchanged
Alomir Aug 25, 2025
3b3f85e
Updates event handler for proper flux handling
Alomir Aug 26, 2025
340e870
Updates event handler for proper flux handling
Alomir Aug 26, 2025
d5d16a5
Updates for tests for retool-events-as-fluxes
Alomir Aug 26, 2025
8c71672
Enables exclusion check for events/microbes
Alomir Aug 26, 2025
4f101d5
Minor comment updates
Alomir Aug 27, 2025
dc358d8
Expand irrigation and water dynamics documentation; clarify event pro…
dlebauer Aug 28, 2025
9252451
Merge branch 'master' into SIP147-retool-events-as-fluxes
dlebauer Aug 28, 2025
528f511
Merge branch 'SIP147-retool-events-as-fluxes' into 148_doc_updates
dlebauer Aug 28, 2025
ac331b7
formatting
dlebauer Aug 28, 2025
30061dd
more formatting
dlebauer Aug 28, 2025
1d99aac
Merge branch 'master' into 148_doc_updates
dlebauer Aug 28, 2025
8e0ccb8
Update docs/.alternate-model-structure-ideas.md
dlebauer Aug 28, 2025
d227753
fixed typos and updated doc of drainage
dlebauer Aug 28, 2025
d59b5db
Merge branch '148_doc_updates' of github.com:pecanproject/sipnet into…
dlebauer Aug 28, 2025
f68674f
update typo F_vol
dlebauer Aug 28, 2025
fae1509
typos
dlebauer Sep 15, 2025
4e69876
Add DOI badge to README
dlebauer Sep 17, 2025
dcb7636
Add documentation for model outputs, parameters, logging; update navi…
dlebauer Sep 22, 2025
da00346
Merge branch '148_doc_updates' of github.com:pecanproject/sipnet into…
dlebauer Sep 22, 2025
1186237
Merge branch 'master' into 148_doc_updates
dlebauer Sep 22, 2025
a80f449
148 even more doc updates (#159)
dlebauer Oct 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 25 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
name: Publish Documentation

name: Deploy production docs
on:
push:
branches:
- "master"
branches: [master]

permissions:
contents: write

jobs:
build:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y doxygen graphviz python3-pip
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y doxygen graphviz
python3 -m pip install --upgrade pip
python3 -m pip install mkdocs mkdocs-material pymdown-extensions

- name: Install MkDocs
- name: Build docs
run: |
pip install mkdocs mkdocs-material pymdown-extensions
make clean document

- name: Generate Documentation
run: make document
- name: Ensure .nojekyll in site root
run: touch site/.nojekyll

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
- name: Deploy to gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: site
branch: gh-pages
folder: site
# Keep PR previews published under pr-preview/
clean: true
clean-exclude: pr-preview/
force: false
42 changes: 42 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Broken Link Check

on:
pull_request:
schedule:
- cron: '0 5 * * 1' # Weekly, Mondays at 05:00 UTC
workflow_dispatch:

permissions:
contents: read

jobs:
link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run lychee
uses: lycheeverse/lychee-action@v2
with:
args: >-
--include-fragments
--no-progress
--verbose
--timeout 20
--max-redirects 10
--max-retries 3
--retry-wait-time 2
--format markdown
--exclude https://doi.org/*
.
fail: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload lychee report
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: lychee-report
path: lychee
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ transpose
.doxygen.stamp
.mkdocs.stamp
site/*
site_preview/*

# documentation
docs/api
Expand Down
31 changes: 15 additions & 16 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
cff-version: 1.2.0
title: "SIPNET: Simple Photosynthesis and Evapotranspiration Model"
version: 2.0..0
version: 2.0.0
abstract: >
SIPNET (Simple Photosynthesis and Evapotranspiration Model) is a process-based
ecosystem model designed to simulate carbon and water fluxes and (optionally) agricultural management
events in terrestrial ecosystems.
SIPNET is used for research in ecosystem ecology, carbon and greenhouse gas accounting,
SIPNET is used for research in ecosystem ecology, agriculture, carbon and greenhouse gas accounting,
data assimilation, and model benchmarking.
Model development and recent features are detailed in the CHANGELOG and relevant literature.
license: BSD-3-Clause
message: "Please cite SIPNET using the metadata from 'preferred-citation'."
type: software
authors:
- family-names: Michael
given-names: Longfritz
orcid: "https://orcid.org/0009-0009-6024-8116"
- family-names: Sacks
given-names: William J.
orcid: "https://orcid.org/0000-0003-2902-5263"
Expand All @@ -27,9 +30,6 @@ authors:
- family-names: Schimel
given-names: David S.
orcid: "https://orcid.org/0000-0003-3473-8065"
- family-names: LeBauer
given-names: David S.
orcid: "https://orcid.org/0000-0001-7228-053X"
- family-names: Kooper
given-names: Rob
orcid: "https://orcid.org/0000-0002-5781-7287"
Expand All @@ -39,10 +39,11 @@ authors:
- family-names: Fer
given-names: Istem
orcid: "https://orcid.org/0000-0001-8236-303X"
- family-names: (other contributors)
given-names: See https://github.com/PecanProject/sipnet/graphs/contributors
- family-names: Michael
given-names: Longfritz
- family-names: Black
given-names: Chris
- family-names: LeBauer
given-names: David S.
orcid: "https://orcid.org/0000-0001-7228-053X"

repository-code: https://github.com/PecanProject/sipnet
keywords:
Expand All @@ -55,9 +56,11 @@ keywords:
preferred-citation:
type: software
title: "SIPNET: Simple Photosynthesis and Evapotranspiration Model"
version: 1.3.0
version: 2.0.0
url: https://github.com/PecanProject/sipnet
authors:
- family-names: Michael
given-names: Longfritz
- family-names: Sacks
given-names: William J.
- family-names: Moore
Expand All @@ -68,18 +71,14 @@ preferred-citation:
given-names: Bobby H.
- family-names: Schimel
given-names: David S.
- family-names: LeBauer
given-names: David S.
- family-names: Kooper
given-names: Rob
- family-names: Dietze
given-names: Michael C.
- family-names: Fer
given-names: Istem
- family-names: Michael
given-names: Longfritz
- family-names: (other contributors)
given-names: See https://github.com/PecanProject/sipnet/graphs/contributors
- family-names: LeBauer
given-names: David S.

references:
- type: article
Expand Down
22 changes: 18 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ SIPNET_TEST_DIRS:=$(shell find tests/sipnet -type d -mindepth 1 -maxdepth 1)
SIPNET_TEST_DIRS_RUN:= $(addsuffix .run, $(SIPNET_TEST_DIRS))
SIPNET_TEST_DIRS_CLEAN:= $(addsuffix .clean, $(SIPNET_TEST_DIRS))

test: $(SIPNET_TEST_DIRS) $(COMMON_LIB) $(SIPNET_LIB)
# Build unit test executables (does not run them)
testbuild: $(SIPNET_TEST_DIRS) $(COMMON_LIB) $(SIPNET_LIB)

# The dash in the build command tells make to continue if there are errors, allowing cleanup
$(SIPNET_TEST_DIRS): $(SIPNET_LIB) $(COMMON_LIB)
Expand All @@ -105,7 +106,7 @@ $(SIPNET_TEST_DIRS_CLEAN):
cleanall: clean testclean

.PHONY: all clean help document exec cleanall \
test $(SIPNET_TEST_DIRS) $(SIPNET_TEST_DIRS_RUN) testclean $(SIPNET_TEST_DIRS_CLEAN) testrun
test testbuild $(SIPNET_TEST_DIRS) $(SIPNET_TEST_DIRS_RUN) testclean $(SIPNET_TEST_DIRS_CLEAN) testrun smoke unit

help:
@echo "Available make targets:"
Expand All @@ -118,11 +119,24 @@ help:
@echo " clean - Remove compiled files, executables, and documentation"
@echo " depend - Generate build dependency information for source files and append to Makefile"
@echo " === Tests ==="
@echo " test - Build the unit tests"
@echo " testrun - Run the unit tests"
@echo " test - Build + run unit tests, then smoke tests"
@echo " testbuild - Build the unit tests (does not run)"
@echo " testrun - Run the unit tests (per-directory runners)"
@echo " unit - Build and run unit tests (wrapper with summary)"
@echo " smoke - Run smoke tests (end-to-end diffs)"
@echo " testclean - Clean build artifacts and executables from the unit tests"
@echo " cleanall - Run both clean and testclean"

# Convenience test targets
unit: sipnet testbuild
./tools/run_unit_tests.sh

smoke: sipnet
./tests/smoke/run_smoke.sh

# Combined verification target
test: sipnet testbuild
./tools/run_unit_tests.sh && ./tests/smoke/run_smoke.sh

# Make sure this target and subsequent comment remain at the bottom of this file
depend::
Expand Down
47 changes: 28 additions & 19 deletions docs/.alternate-model-structure-ideas.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,16 @@ $$

Heterotrophic respiration ($R_h$) is a function of soil carbon content ($C_S$), a scaling factor ($K_h$), the $Q_{10}$ factor, and the ratio of soil moisture ($W$) to water holding capacity ($W_e$).

## Flooding
## Irrigation

### Moisture based irrigation

Currently, irrigation is specified as an amount.

Additional approach based on farmer behavior:
To represent an irrigation program that sets a moisture range and turns irrigation on at a lower moisture threshold and of at an upper threshold. This could be done internally by directly changing the soil moisture content - while keeping track of the amount of water added to report in events.out.

### Flooding

There are multiple options for representing flooding.

Expand All @@ -42,17 +51,17 @@ K could be a fixed value like 2 or 10. Or a site level parameter if warranted (e

### Variables (Pools, Fluxes, and Parameters)

| Symbol | Description |
|----------------|-----------------------------------------------------------------------------|
| $$ R_{\text{leach,NO3}} $$ | Rate of nitrate leaching |
| $$ R_{\text{NH4,fert}} $$ | Rate of ammonium fertilization input |
| $$ R_{\text{NO3,fert}} $$ | Rate of nitrate fertilization input
| Symbol | Description |
| -------------------------- | ------------------------------------ |
| $$ R_{\text{leach,NO3}} $$ | Rate of nitrate leaching |
| $$ R_{\text{NH4,fert}} $$ | Rate of ammonium fertilization input |
| $$ R_{\text{NO3,fert}} $$ | Rate of nitrate fertilization input |

### Subscripts (Temporal, Spatial, or Contextual Identifiers)
| Subscript | Description |
|--------------- |----------------------------------------------------------------------------- |
| $$ _\text{nitr} $$ | nitrification |
| $$ _\text{denitr} $$ | denitrification
| Subscript | Description |
| -------------------- | --------------- |
| $$ _\text{nitr} $$ | nitrification |
| $$ _\text{denitr} $$ | denitrification |


### Soil Ammonium
Expand Down Expand Up @@ -363,15 +372,15 @@ Some options considered:
- Adapt the parabolic $D_\text{temp, A}$ from SIPNET (Braswell et al 2005)


| Function | Formula | Parameters | Notes |
|-------------------------------------|-----------------------------------------------------------------------------------------|-------------------------------------|------------------------------------------------------------------------------------------------|
| **Beta Function** | $\left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)^\beta \cdot \left( 1 - \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)^\gamma$ | 4 ($\beta, \gamma, f_{\text{WHC,min}}, f_{\text{WHC,max}}$) | Scaled to [0, 1] within $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. Peak shape controlled by $\beta$ and $\gamma$. |
| **Gaussian Function** | $e^{-\frac{\left( \frac{f_{\text{WHC}} - \mu}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)^2}{2\sigma^2}}$ | 3 ($\mu, \sigma, f_{\text{WHC,max}}, f_{\text{WHC,min}}$) | Fixed maximum of 1. Centered at $\mu$, scaled to $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. Symmetric around $\mu$. |
| **Piecewise Linear Function** | $\begin{cases} m_1 \left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right) + c_1, & f_{\text{WHC}} \leq f_{\text{WHC,mid}} \\ m_2 \left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right) + c_2, & f_{\text{WHC}} > f_{\text{WHC,mid}} \end{cases}$ | 6 ($m_1, c_1, m_2, c_2, f_{\text{WHC,min}}, f_{\text{WHC,max}}$) | Two linear segments split at $f_{\text{WHC,mid}}$. Scaled to $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. |
| **Double Exponential Function** | $a_1 e^{b_1 \left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)} + a_2 e^{b_2 \left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)}$ | 4 ($a_1, b_1, a_2, b_2$) | Scaled exponential components to $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. |
| **Piecewise Double Exponential** | $\begin{cases} (1 - e^{-k_1(f_{\text{WHC}} - f_{\text{WHC,min}})}), & f_{\text{WHC}} \leq f_{\text{WHC,opt}} \\ e^{-k_2(f_{\text{WHC}} - f_{\text{WHC,opt}})}, & f_{\text{WHC}} > f_{\text{WHC,opt}} \end{cases}$ | 4 ($k_1, k_2, f_{\text{WHC,opt}}, f_{\text{WHC,min}}$) | Piecewise rise (left of $f_{\text{WHC,opt}}$) and asymmetric exponential decay (right). Scaled to range. |
| **Double Logistic Function** | $\frac{1}{1 + e^{-k_1 \left( \frac{f_{\text{WHC}} - x_1}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)}} + \frac{1}{1 + e^{-k_2 \left( \frac{f_{\text{WHC}} - x_2}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)}}$ | 6 ($k_1, x_1, k_2, x_2, f_{\text{WHC,min}}, f_{\text{WHC,max}}$) | Scaled logistic transitions split at $x_1$ and $x_2$. Scaled to $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. |
| **Parabolic (SIPNET)** | $a \left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} - b \right)^2 + c$ | 5 ($a, b, c, f_{\text{WHC,min}}, f_{\text{WHC,max}}$) | Scaled to $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. Derived from SIPNET temperature-response function. |
| Function | Formula | Parameters | Notes |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| **Beta Function** | $\left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)^\beta \cdot \left( 1 - \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)^\gamma$ | 4 ($\beta, \gamma, f_{\text{WHC,min}}, f_{\text{WHC,max}}$) | Scaled to [0, 1] within $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. Peak shape controlled by $\beta$ and $\gamma$. |
| **Gaussian Function** | $e^{-\frac{\left( \frac{f_{\text{WHC}} - \mu}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)^2}{2\sigma^2}}$ | 3 ($\mu, \sigma, f_{\text{WHC,max}}, f_{\text{WHC,min}}$) | Fixed maximum of 1. Centered at $\mu$, scaled to $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. Symmetric around $\mu$. |
| **Piecewise Linear Function** | $\begin{cases} m_1 \left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right) + c_1, & f_{\text{WHC}} \leq f_{\text{WHC,mid}} \\ m_2 \left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right) + c_2, & f_{\text{WHC}} > f_{\text{WHC,mid}} \end{cases}$ | 6 ($m_1, c_1, m_2, c_2, f_{\text{WHC,min}}, f_{\text{WHC,max}}$) | Two linear segments split at $f_{\text{WHC,mid}}$. Scaled to $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. |
| **Double Exponential Function** | $a_1 e^{b_1 \left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)} + a_2 e^{b_2 \left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)}$ | 4 ($a_1, b_1, a_2, b_2$) | Scaled exponential components to $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. |
| **Piecewise Double Exponential** | $\begin{cases} (1 - e^{-k_1(f_{\text{WHC}} - f_{\text{WHC,min}})}), & f_{\text{WHC}} \leq f_{\text{WHC,opt}} \\ e^{-k_2(f_{\text{WHC}} - f_{\text{WHC,opt}})}, & f_{\text{WHC}} > f_{\text{WHC,opt}} \end{cases}$ | 4 ($k_1, k_2, f_{\text{WHC,opt}}, f_{\text{WHC,min}}$) | Piecewise rise (left of $f_{\text{WHC,opt}}$) and asymmetric exponential decay (right). Scaled to range. |
| **Double Logistic Function** | $\frac{1}{1 + e^{-k_1 \left( \frac{f_{\text{WHC}} - x_1}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)}} + \frac{1}{1 + e^{-k_2 \left( \frac{f_{\text{WHC}} - x_2}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} \right)}}$ | 6 ($k_1, x_1, k_2, x_2, f_{\text{WHC,min}}, f_{\text{WHC,max}}$) | Scaled logistic transitions split at $x_1$ and $x_2$. Scaled to $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. |
| **Parabolic (SIPNET)** | $a \left( \frac{f_{\text{WHC}} - f_{\text{WHC,min}}}{f_{\text{WHC,max}} - f_{\text{WHC,min}}} - b \right)^2 + c$ | 5 ($a, b, c, f_{\text{WHC,min}}, f_{\text{WHC,max}}$) | Scaled to $f_{\text{WHC,min}}$ and $f_{\text{WHC,max}}$. Derived from SIPNET temperature-response function. |

## Effect of SOM on Soil Water Dynamics

Expand Down
Loading