Skip to content

Commit 4eb6389

Browse files
authored
SIP333 docs (#335)
* update model structure b/c not all source is in sipnet.c * added check limitations to code-structure doc
1 parent 64402b4 commit 4eb6389

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

docs/developer-guide/code-structure.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@ This guide documents how state is advanced each timestep and the conventions tha
88
- Zero all `fluxes.*` and `fluxes.event*`.
99

1010
2) Compute fluxes (pure calculations)
11-
- `calculateFluxes()` computes photosynthesis, respiration, water/snow, etc.
1211
- `processEvents()` converts scheduled/instant events to `fluxes.event*` deltas (no pool mutation).
13-
- No function in this phase mutates `envi.*` or `trackers.*`.
14-
12+
- `calculateFluxes()` computes photosynthesis, respiration, water/snow, etc.
13+
- `checkLimitations()` may adjust already-computed fluxes when a flux is resource limited.
14+
- No function in this phase mutates `envi.*` or `trackers.*`.
1515

1616
3) Apply pool updates (single place)
1717
- `updateMainPools()` updates leafC, woodC, soil water and snow pools
1818
- `updatePoolsForSoil()` updates soil carbon pools
19+
- `updateNitrogenPools()` updates mineral, soil organic, and litter nitrogen pools.
1920
- `updatePoolsForEvents()` updates pools for fluxes from events
2021
- The above functions are the only code that changes `envi.*`.
2122
- For each pool P: ΔP = ((sum of rate fluxes to P) + (sum of event fluxes to P)) * climate.length

docs/model-structure.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This document provides an overview of the SIPNET model’s structure. It was wri
2424
- Focus on features currently in regular use.
2525

2626
There are multiple ways to configure the model structure, and not all model structures or components are listed.
27-
Implementation in source code (sipnet.c) is annotated with references to specific publications.
27+
Implementation in source code is annotated with references to specific publications.
2828

2929
#### Notes on notation:
3030

@@ -1174,7 +1174,7 @@ nitrogen (calculated from the leaf C:N ratio) is also transferred to the litter
11741174
**Event parameters:**
11751175

11761176
| Parameter | Value | Description |
1177-
|-----------|----------------------|-------------------|
1177+
| --------- | -------------------- | ----------------- |
11781178
| Year | integer | Year |
11791179
| Day | integer | Day of year |
11801180
| Type | `leafon` / `leafoff` | The type of event |

0 commit comments

Comments
 (0)