malcolmSQ commited on
Commit
8b4903a
·
1 Parent(s): 0cefa06

Update README and add model-specific READMEs for all growth models

Browse files
README.md CHANGED
@@ -1,6 +1,58 @@
1
- # Mangrove Emissions Reduction (ER) Modeling Suite
2
 
3
- A Python toolkit and interactive dashboard for modeling carbon sequestration and tree survival in mangrove restoration projects. Supports multiple growth and mortality models, including Chapman-Richards and Jimenez & Lugo parameterizations.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
 
5
  ---
6
 
 
1
+ # Mangrove Emissions Reduction Model & Dashboard
2
 
3
+ This project implements a flexible, multi-model dashboard for mangrove carbon sequestration and emissions reduction, supporting several growth models:
4
+
5
+ - **Chapman-Richards** (default/original)
6
+ - **Simple Linear**
7
+ - **Linear Plateau**
8
+ - **Declining Increment**
9
+
10
+ ## Features
11
+ - Compare multiple growth models side-by-side in a Gradio dashboard.
12
+ - Each model is configured via a YAML file in `configs/`.
13
+ - Each tab in the dashboard corresponds to a different model.
14
+ - Planting schedule is editable for the Original Model tab.
15
+ - All plots and tables update live.
16
+ - Dashboard can be shared via a public link (`share=True`).
17
+
18
+ ## Usage
19
+
20
+ 1. **Install dependencies:**
21
+ ```bash
22
+ conda env create -f environment.yml
23
+ conda activate er-model
24
+ ```
25
+ 2. **Run the dashboard:**
26
+ ```bash
27
+ python dashboard/app.py
28
+ ```
29
+ The terminal will display a public share link.
30
+
31
+ 3. **Add new models:**
32
+ - Add a new YAML config to `configs/` (see examples for structure).
33
+ - Add an entry to `MODEL_CONFIGS` in `dashboard/app.py`.
34
+ - Optionally, add a README in the corresponding `models/` subfolder.
35
+
36
+ ## Growth Models
37
+ - **Chapman-Richards:** Flexible sigmoidal growth, suitable for most mangrove species.
38
+ - **Simple Linear:** Constant annual increment.
39
+ - **Linear Plateau:** Linear growth up to a plateau.
40
+ - **Declining Increment:** Annual increment declines linearly to zero; total size is the sum of non-negative increments (never decreases or goes negative).
41
+
42
+ ## File Structure
43
+ - `dashboard/app.py` — Gradio dashboard UI and logic
44
+ - `src/er_model.py` — Core model logic and growth functions
45
+ - `configs/` — Model configuration YAMLs
46
+ - `models/` — Reference model folders (see subfolder READMEs)
47
+
48
+ ## Notes
49
+ - The dashboard is designed for easy extension: just add a config and a tab.
50
+ - All growth models are robust to negative/complex values.
51
+ - Diagnostics are included for debugging growth and biomass calculations.
52
+
53
+ ---
54
+
55
+ For more details, see the README files in each `models/` subfolder.
56
 
57
  ---
58
 
models/declining_increment/README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # Declining Increment Model
2
+
3
+ This folder documents the **Declining Increment** growth model used in the Mangrove ER Dashboard.
4
+
5
+ - **Growth Model:** Declining Increment (annual increment declines linearly to zero; total size is the sum of non-negative increments)
6
+ - **Parameters:** See `configs/declining_increment.yaml`
7
+ - **Purpose:** For comparison with other models; may be appropriate for species or sites where growth slows with age.
8
+ - **Usage:** Available as a tab in the dashboard for side-by-side comparison.
9
+
10
+ **Note:** In this model, total DBH and height are calculated by summing annual increments, which decline to zero but never go negative. This ensures that size never decreases or becomes negative.
models/jimenez_lugo/README.md ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ # Jimenez-Lugo Model
2
+
3
+ This folder is reserved for the Jimenez-Lugo growth model and related files.
4
+
5
+ - **Growth Model:** Jimenez-Lugo (alternative parameterization)
6
+ - **Purpose:** For comparison with Chapman-Richards and other models; may be used for specific species or regions where this parameterization is justified.
7
+ - **Status:** Deprecated/not currently used in the dashboard tabs. All references have been removed from the main app, but this folder is retained for archival and reproducibility purposes.
8
+
9
+ If you wish to re-enable this model, add its config to `configs/` and update `MODEL_CONFIGS` in `dashboard/app.py`.
models/linear/README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # Simple Linear Model
2
+
3
+ This folder documents the **Simple Linear** growth model used in the Mangrove ER Dashboard.
4
+
5
+ - **Growth Model:** Linear (constant annual increment)
6
+ - **Parameters:** See `configs/linear.yaml`
7
+ - **Purpose:** For comparison with other models; may be appropriate for young plantations or where growth is approximately linear.
8
+ - **Usage:** Available as a tab in the dashboard for side-by-side comparison.
9
+
10
+ This model is best used for demonstration or for species/sites where linear growth is justified by data.
models/linear_plateau/README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # Linear Plateau Model
2
+
3
+ This folder documents the **Linear Plateau** growth model used in the Mangrove ER Dashboard.
4
+
5
+ - **Growth Model:** Linear Plateau (linear growth up to a plateau, then constant)
6
+ - **Parameters:** See `configs/linear_plateau.yaml`
7
+ - **Purpose:** For comparison with other models; may be appropriate for species or sites where growth levels off after a certain age.
8
+ - **Usage:** Available as a tab in the dashboard for side-by-side comparison.
9
+
10
+ This model is useful for scenarios where trees grow rapidly at first, then reach a maximum size.
models/original/README.md CHANGED
@@ -1,4 +1,15 @@
1
- # Original Model
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  ## Model Overview
4
  This is the default Chapman-Richards-based mangrove growth and carbon model for the project. It uses species-specific growth curves and DBH-dependent mortality to estimate carbon sequestration and tree survival over time.
 
1
+ # Original Model (Chapman-Richards)
2
+
3
+ **This is the default model and the only one with an editable planting schedule in the dashboard.**
4
+
5
+ This folder contains reference files and documentation for the **Original Model** used in the Mangrove ER Dashboard.
6
+
7
+ - **Growth Model:** Chapman-Richards (flexible sigmoidal growth)
8
+ - **Purpose:** Baseline/reference for all comparisons
9
+ - **Parameters:** See `configs/params.yaml`
10
+ - **Usage:** Used in the 'Original Model' tab of the dashboard, with editable planting schedule.
11
+
12
+ This is the default model for the project and is recommended for most mangrove species unless otherwise justified.
13
 
14
  ## Model Overview
15
  This is the default Chapman-Richards-based mangrove growth and carbon model for the project. It uses species-specific growth curves and DBH-dependent mortality to estimate carbon sequestration and tree survival over time.