Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/introduce biota #83

Merged
merged 123 commits into from
Apr 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
1d216af
new constants class
DzimbaS Mar 16, 2022
ef033b1
new class colonization start
DzimbaS Mar 16, 2022
93d37df
new class vegetation
DzimbaS Mar 21, 2022
46039f5
changes to veg_model
DzimbaS Mar 21, 2022
99777ae
created get_hydromorphodynamics and import vegetation model
deboradta Mar 22, 2022
3bd62d6
base_simulation.py - created initiate_hydromorphodynamics
deboradta Mar 28, 2022
36f84b5
Addition of vegetation characteristics method, growth and mortality c…
DzimbaS Mar 28, 2022
4238dd9
Merge branch 'saltmarsh_debora' into SaltMarsh_Sarah
DzimbaS Mar 29, 2022
69e8e77
Addition of vegetation characteristics method, growth and mortality c…
DzimbaS Mar 29, 2022
fac4a49
add class Hydro_Morphodynamics, process in veg_base_simulation.py
DzimbaS Mar 29, 2022
7a49900
changes to Hydro_Morphodynamics, process in veg_base_simulation.py
DzimbaS Mar 29, 2022
df2a4d7
changes to Hydro_Morphodynamics, process in veg_base_simulation.py, p…
DzimbaS Mar 29, 2022
d0ab434
changes to Hydro_Morphodynamics, process in veg_base_simulation.py, p…
DzimbaS Mar 30, 2022
5bbb8b4
progress in mortality
DzimbaS Mar 30, 2022
66f7f72
output
deboradta Mar 30, 2022
428c137
updates to output
deboradta Mar 31, 2022
fcbcfb9
progress in mortality
DzimbaS Mar 31, 2022
6aa5d37
Merge branch 'SaltMarsh_Sarah' into saltmarsh_debora
deboradta Mar 31, 2022
95d1c0f
Merge branch 'saltmarsh_debora' into SaltMarsh_Sarah
DzimbaS Mar 31, 2022
62727fa
account for maxAge vegetation in veg_growth
DzimbaS Mar 31, 2022
11b4004
Merge branch 'SaltMarsh_Sarah' into saltmarsh_debora
deboradta Mar 31, 2022
d5d4fc8
account for maxAge vegetation in veg_growth
DzimbaS Mar 31, 2022
a119170
Merge branch 'SaltMarsh_Sarah' into saltmarsh_debora
deboradta Mar 31, 2022
2d85f97
updates to output
deboradta Mar 31, 2022
c4e1589
changes after debugging
DzimbaS Mar 31, 2022
eadb6ec
simtest
DzimbaS Apr 1, 2022
861e7b8
veg_delft3D_simulation file
DzimbaS Apr 1, 2022
967bd69
changes to veg_model
DzimbaS Apr 1, 2022
15e4cd9
updates veg_model
deboradta Apr 4, 2022
5f67647
json file for constants and changes to constants class
DzimbaS Apr 4, 2022
1ba7954
Merge branch 'SaltMarsh_Sarah' into saltmarsh_debora
deboradta Apr 4, 2022
9ebe563
Merge branch 'saltmarsh_debora' into SaltMarsh_Sarah
DzimbaS Apr 4, 2022
4dbb854
changes to Vegetation
DzimbaS Apr 4, 2022
81fb7c1
updates veg_model
deboradta Apr 4, 2022
a98b2a4
updates veg_model growth nogrowth
deboradta Apr 4, 2022
2b8d0c8
changes to Vegetation
DzimbaS Apr 4, 2022
b99fde7
updates veg_model and new veg_lifestages
deboradta Apr 4, 2022
ee2d067
updates veg_model and new veg_lifestages
deboradta Apr 4, 2022
51ddc0f
changes to Vegetation
DzimbaS Apr 4, 2022
411bca6
changes to Vegetation
DzimbaS Apr 4, 2022
e9ad3de
Debugging
DzimbaS Apr 5, 2022
395dedc
Debugging
DzimbaS Apr 5, 2022
d454994
Debugging
DzimbaS Apr 5, 2022
14fde55
Debugging
DzimbaS Apr 6, 2022
701cc10
Added README for the veg_model
DzimbaS Apr 6, 2022
b672141
Added README for the veg_model
DzimbaS Apr 6, 2022
1c2b54f
Added README for the veg_model
DzimbaS Apr 6, 2022
2d85e09
delete old readme
DzimbaS Apr 6, 2022
9d47fce
Rename veg_model_README.md to README.md
DzimbaS Apr 6, 2022
68b826a
delete entries in the initial life stage after passing it to juvenile
DzimbaS Apr 6, 2022
8605081
Merge remote-tracking branch 'origin/SaltMarsh_Sarah' into SaltMarsh_…
DzimbaS Apr 6, 2022
55d916b
delete entries in the initial life stage after passing it to juvenile
DzimbaS Apr 6, 2022
7005778
add Puccinellia to species in constants, debugging
DzimbaS Apr 6, 2022
5762e51
debugging
DzimbaS Apr 6, 2022
f7db10c
debugging
DzimbaS Apr 7, 2022
b9cdc2a
debugging
DzimbaS Apr 7, 2022
4f329bd
debugging
DzimbaS Apr 8, 2022
21d4c98
debugging and file to read output
DzimbaS Apr 8, 2022
6d1579f
debugging and output
DzimbaS Apr 8, 2022
c7d824f
debugging and output
DzimbaS Apr 8, 2022
2416842
debugging and additions for Salicornia
DzimbaS Apr 11, 2022
306e463
updates veg_mortality.py
deboradta Apr 11, 2022
3cbb510
changes in mortality
DzimbaS Apr 11, 2022
5376074
changes in update lifestages
DzimbaS Apr 11, 2022
4184bc5
changes in output
DzimbaS Apr 12, 2022
484c1fc
ci(pyproject.toml): Corrected tool typo
Carsopre Apr 12, 2022
53e1ce3
Merge pull request #77 from DzimbaS/SaltMarsh_Sarah
deboradta Apr 12, 2022
f36209f
Merge branch 'feature/small-hackathon' of https://github.com/Deltares…
Carsopre Apr 12, 2022
ac43ce1
added test case
DzimbaS Apr 12, 2022
cfe83b3
Merge branch 'feature/small-hackathon' of https://github.com/Deltares…
Carsopre Apr 12, 2022
d462ae7
test(test/test_data/): Added missing data
Carsopre Apr 12, 2022
9f145d6
test_acceptance.py
DzimbaS Apr 12, 2022
8860a20
delete sim_test
DzimbaS Apr 12, 2022
6c085ce
test(test/test_acceptance.py): Fixed test
Carsopre Apr 12, 2022
448c0d6
test(test/test_acceptance.py): Modified test to run on any machine
Carsopre Apr 12, 2022
aa1b174
test(transect_case): Fixed missing test data for the transect case ou…
Carsopre Apr 12, 2022
9dab0a1
autoformat: isort & black
Carsopre Apr 12, 2022
a30d032
refactor(biota): Added biota as a common abstraction from vegetation …
Carsopre Apr 12, 2022
aee0de3
autoformat: isort & black
Carsopre Apr 12, 2022
1a76a94
refactor(base_output_wrapper): Refactored output wrapper to use concr…
Carsopre Apr 12, 2022
85a7694
Merge branch 'feature/introduce_biota' of https://github.com/Deltares…
Carsopre Apr 12, 2022
7a3c42b
refactor(veg_base_simulation.py): Changed import
Carsopre Apr 12, 2022
fb73acf
Documentation
deboradta Apr 12, 2022
401fdf5
Merge remote-tracking branch 'origin/feature/small-hackathon' into fe…
deboradta Apr 12, 2022
e294cc3
autoformat: isort & black
deboradta Apr 12, 2022
8b5bd8a
Merge branch 'feature/small-hackathon' into feature/introduce_biota
Carsopre Apr 12, 2022
5e1f6f0
refactor(biota): Added init file and fixed a few files
Carsopre Apr 12, 2022
4b18daf
refactor(vegetation): Extracted vegation into its own directory / module
Carsopre Apr 12, 2022
be091b0
refactor(vegetation): Fixed references and improts
Carsopre Apr 12, 2022
0eaf9cb
refactor(veg_constants.py): Moved vegetation constants to separate mo…
Carsopre Apr 12, 2022
44f0e2f
refactor(veg_constants.py): Updated references
Carsopre Apr 12, 2022
0c568cd
refactor(vegetation/bio_process): Moved vegetation bio_processes to i…
Carsopre Apr 12, 2022
32b18e7
docs(run_simulation_veg.md): Changed outdated references
Carsopre Apr 12, 2022
945bd3e
refactor(base_constants.py): Created a BaseConstants class to explict…
Carsopre Apr 12, 2022
f171eed
refactor(base_constants.py): Replaced concrete CoralConstants with Ba…
Carsopre Apr 12, 2022
d72bb5d
chore(src/core/simulation/coral_transect_simulation.py): Fixed outdat…
Carsopre Apr 12, 2022
c6d9a2d
chore(base_simulation.py): Reverted call to from_input_file, needs fu…
Carsopre Apr 12, 2022
371ca4e
autoformat: isort & black
Carsopre Apr 12, 2022
b5e7467
fix bugs in veg_mortality.py
DzimbaS Apr 13, 2022
04f1f38
autoformat: isort & black
DzimbaS Apr 13, 2022
3625fdc
refactor(coral_simulation.py): Created intermediate coral simulation …
Carsopre Apr 13, 2022
115e0fe
refactor(src/coral): Extracted coral model and simulation from the co…
Carsopre Apr 13, 2022
8349d22
refactor(coral/model/coral_constants.py;coral/output/coral_output_wra…
Carsopre Apr 13, 2022
f6e1f6c
refactor(coral/output;core/output): Split coral from core output at p…
Carsopre Apr 13, 2022
bed10c3
Merge branch 'feature/introduce_biota' of https://github.com/Deltares…
Carsopre Apr 13, 2022
56c739b
chore(sm_plot.py): Moved custom script to tools
Carsopre Apr 13, 2022
01413b8
Merge branch 'feature/small-hackathon' into feature/introduce_biota
Carsopre Apr 13, 2022
ac019ce
refactor(src/vegetation/model/veg_constants.py): Refactored the way w…
Carsopre Apr 13, 2022
320e09a
refactor(base_output): Renamed concrete output models to match their …
Carsopre Apr 13, 2022
679a011
test(test/core/output/test_output_model.py): Adapted failing test to …
Carsopre Apr 13, 2022
b16a161
autoformat: isort & black
Carsopre Apr 13, 2022
da64d8e
Merge branch 'master' into feature/introduce_biota
Carsopre Apr 13, 2022
c64839c
chore(master): Fixed some merge issues from master
Carsopre Apr 13, 2022
8f81e15
chore(veg_mortality.py): Ensured fix was in the branch, added a few p…
Carsopre Apr 13, 2022
e563107
Merge branch 'feature/introduce_biota' of https://github.com/Deltares…
Carsopre Apr 13, 2022
cfab405
autoformat: isort & black
Carsopre Apr 13, 2022
8a07923
refactor(coral/bio_process): Moved all from core all coral bioprocesses
Carsopre Apr 13, 2022
57ced43
Merge branch 'feature/introduce_biota' of https://github.com/Deltares…
Carsopre Apr 13, 2022
e05d3b4
refactor(biota_models): Grouped vegetation and coral into biota_model…
Carsopre Apr 13, 2022
8d8ba44
autoformat: isort & black
Carsopre Apr 13, 2022
c2214ad
docs(../README.md;../docs/index.md): Updated main readme
Carsopre Apr 13, 2022
829bc60
Merge branch 'feature/introduce_biota' of https://github.com/Deltares…
Carsopre Apr 13, 2022
709ba60
docs(docs/reference): Updated code reference to mirror the src structure
Carsopre Apr 13, 2022
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
57 changes: 14 additions & 43 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,48 +1,19 @@
# How to run a Vegetation simulation in NBSDynamics
[![ci](https://github.com/Deltares/NBSDynamics/actions/workflows/ci.yml/badge.svg)](https://github.com/Deltares/NBSDynamics/actions/workflows/ci.yml)
[![docs](https://github.com/Deltares/NBSDynamics/actions/workflows/docs.yml/badge.svg)](https://github.com/Deltares/NBSDynamics/actions/workflows/docs.yml)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Deltares_NBSDynamics&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Deltares_NBSDynamics)
![Sonar Coverage](https://img.shields.io/sonar/coverage/Deltares_NBSDynamics?logo=SonarCloud&server=https%3A%2F%2Fsonarcloud.io&?style=plastic&logo=appveyor)

![GitHub release (latest by date)](https://img.shields.io/github/v/release/Deltares/NBSDynamics)
![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/Deltares/NBSDynamics)

## Simulation structure.
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

The simulation is started using the [simtest_saltmars_test](../../test/test_data/simtest_saltmarsh_test.py) file.
Here the different paths need to be specified.
An object of the class [VegFlowFmSimulation](../../src/core/simulation/veg_delft3d_simulation.py) (which inherits from the BaseSimulation) is created.
Within the object, the vegetation species (in constants and vegetation) are required as an input.
Different species are defined through different constants.
In [Constants](../../src/core/common/constants_veg.py) a json file is called which contains the species specific vegetation parameters.
Additional time related constants (e.g. start time and ecological time steps) are defined in [Constants](../../src/core/common/constants_veg.py) and can be changed manually there.
Further species can be added by defining their specific parameters using [constants_json_create](../../src/core/common/constants_json_create.py).
# Official Documentation.
Check our official GitHub pages documentation at [https://deltares.github.io/NBSDynamics/](https://deltares.github.io/NBSDynamics/).

With those parameters assigned to the object, the simulation is started by using the following methods (specified in the [BaseSimulation](../../src/core/simulation/veg_base_simulation.py)):
# Current supported models.
Currently we support the Vegetation and Coral models. More details of how to run them can be found at their respective documentation pages.
In addition, quick links on how to run models in this package:
* [Basics: How to run 'any' model](https://deltares.github.io/NBSDynamics/guides/run_simulation/)
* [How to run a Vegetation Model](https://deltares.github.io/NBSDynamics/guides/run_simulation_veg/)

* initiate
* configures hydrodynamics and output
* validates simulation directories
* initiated vegetation characteristics for all life stages in the class [LifeStages](../../src/core/vegetation/veg_lifestages.py)
* initializes the output ([VegOutputWrapper](../../src/core/output/veg_output_wrapper.py))

* run
* when calling the run method (sim_run.run()), the duration of the simulation needs to be specified (in years) (e.g. sim_run.run(5))
* if duration is not given, the duration specified in the [Constants](../../src/core/common/constants_veg.py) class will be used
* the start date is set to the date specified in [Constants](../../src/core/common/constants_veg.py)
* end date = start date + duration
* a loop is started over the duration of the simulation (years)
* inside of that loop another loop iterates over the number of ecological time steps per year (coupling times per year) specified in [Constants](../../src/core/common/constants_veg.py)
* to get the hydro and morphological variables from Delft-FM, the hydro-morphodynamics are retrieved every day.
* the coupling and retrieving of the values is specified in the class [Delft3D](../../src/core/hydrodynamics/delft3d.py)
* aggregated values are then created in the class [Hydro_Morphodynamics](../../src/core/bio_process/hydromorphodynamics.py) and retrieved via the method 'get_hydromorph_values'
* the vegetation dynamics are initiated:
* [Mortality and Growth](../../src/core/bio_process/veg_mortality.py)
* criteria for mortality and mortality fractions are determined based on the species and the morpho- & hydrodynamics
* vegetation growth is initiated based on the number of growth days within the current ecological time step
* [Colonization](../../src/core/bio_process/veg_colonisation.py)
* method is only called when colonization is possible during the specific period of the ecological time step
* criteria for colonization are determined based on the species and the morpho- & hydrodynamics
* the vegetation characteristics of the initial lifestage are updated based on the possible colonization
* [Update_Lifestages](../../src/core/vegetation/veg_model.py)
* the life stages are updates (initial to juvenile and juvenile to mature)
* initial to juvenile always occurs when new vegetation colonized
* juvenile to mature only occurs when vegetation in the juvenile stage reached the maximum years in that life stage
* if the maximum age of vegetation is reached, the vegetation is removed
* The results are exported using the methods defined in [MapOutput](../../src/core/output/veg_output_model.py) and [HisOutput](../../src/core/output/veg_output_model.py)

* finalize (Finalize simulation)
4 changes: 2 additions & 2 deletions docs/guides/run_simulation.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ The following simulations are defined, however their status is not yet final and
#### Coral FlowFm Simulation
Open issue: [#68 Fix Delft3D - FlowFMModel run.](https://github.com/Deltares/NBSDynamics/issues/68)

A simulation using the [CoralFlowFmSimulation](reference/simulation/simulation/#src.core.simulation.coral_delft3d_simulation.CoralFlowFmSimulation) object. Which will build the simulation around a `FlowFMModel` hydrodynamic model.
A simulation using the [CoralFlowFmSimulation](reference/simulation/simulation/#src.biota_models.coral.simulation.coral_delft3d_simulation.CoralFlowFmSimulation) object. Which will build the simulation around a `FlowFMModel` hydrodynamic model.

#### Coral Dimr Simulation
Open issue: [#69 Fix / Implement Delft3D - DIMR run.](https://github.com/Deltares/NBSDynamics/issues/69)

A simulation using the [CoralDimrSimulation](../../reference/simulation/simulation/#src.core.simulation.coral_delft3d_simulation.CoralDimrSimulation) object. Which will build the simulation around a `DimrModel` hydrodynamic model.
A simulation using the [CoralDimrSimulation](../../reference/simulation/simulation/#src.biota_models.coral.simulation.coral_delft3d_simulation.CoralDimrSimulation) object. Which will build the simulation around a `DimrModel` hydrodynamic model.
30 changes: 15 additions & 15 deletions docs/guides/run_simulation_veg.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,44 +5,44 @@

The simulation is started using the [simtest_saltmars_test](../../test/test_data/simtest_saltmarsh_test.py) file.
Here the different paths need to be specified.
An object of the class [VegFlowFmSimulation](../../reference/simulation/vegetation_simulation/#src.core.simulation.veg_delft3d_simulation) (which inherits from the BaseSimulation) is created.
An object of the class [VegFlowFmSimulation](../../reference/simulation/vegetation_simulation/#src.biota_models.vegetation.simulation.veg_delft3d_simulation) (which inherits from the BaseSimulation) is created.
Within the object, the vegetation species (in constants and vegetation) are required as an input.
Different species are defined through different constants.
In [Constants](../../reference/common/common/#src.core.common.constants_veg) a json file is called which contains the species specific vegetation parameters.
Additional time related constants (e.g. start time and ecological time steps) are defined in [Constants](../../src/core/common/common/#src.core.common.constants_veg) and can be changed manually there.
Further species can be added by defining their specific parameters using [constants_json_create](../../src/core/common/common/#src.core.common.constants_json_create).
In [Constants](../../reference/common/common/#src.biota_models.vegetation.model.veg_constants) a json file is called which contains the species specific vegetation parameters.
Additional time related constants (e.g. start time and ecological time steps) are defined in [Constants](../../src/core/common/common/#src.biota_models.vegetation.model.veg_constants) and can be changed manually there.
Further species can be added by defining their specific parameters using [constants_json_create](../../src/core/common/common/#src.biota_models.vegetation.model.constants_json_create).

With those parameters assigned to the object, the simulation is started by using the following methods (specified in the [BaseSimulation](../../reference/simulation/vegetation_simulation/#src.core.simulation.veg_base_simulation)):
With those parameters assigned to the object, the simulation is started by using the following methods (specified in the [BaseSimulation](../../reference/simulation/vegetation_simulation/#src.biota_models.vegetation.simulation.veg_base_simulation)):

* initiate
* configures hydrodynamics and output
* validates simulation directories
* initiated vegetation characteristics for all life stages in the class [LifeStages](../../reference/vegetation/vegetation_model/#src.core.vegetation.veg_lifestages)
* initializes the output ([VegOutputWrapper](../../reference/output/vegetation_output/#src.core.output.veg_output_wrapper))
* initiated vegetation characteristics for all life stages in the class [LifeStages](../../reference/vegetation/vegetation_model/#src.biota_models.vegetation.model.veg_lifestages)
* initializes the output ([VegOutputWrapper](../../reference/output/vegetation_output/#src.biota_models.vegetation.output.veg_output_wrapper))

* run
* when calling the run method (sim_run.run()), the duration of the simulation needs to be specified (in years) (e.g. sim_run.run(5))
* if duration is not given, the duration specified in the [Constants](../../reference/common/common/#src.core.common.constants_veg) class will be used
* the start date is set to the date specified in [Constants](../../reference/common/common/#src.core.common.constants_veg)
* if duration is not given, the duration specified in the [Constants](../../reference/common/common/#src.biota_models.vegetation.model.veg_constants) class will be used
* the start date is set to the date specified in [Constants](../../reference/common/common/#src.biota_models.vegetation.model.veg_constants)
* end date = start date + duration
* a loop is started over the duration of the simulation (years)
* inside of that loop another loop iterates over the number of ecological time steps per year (coupling times per year) specified in [Constants](../../reference/common/common/#src.core.common.constants_veg)
* inside of that loop another loop iterates over the number of ecological time steps per year (coupling times per year) specified in [Constants](../../reference/common/common/#src.biota_models.vegetation.model.veg_constants)
* to get the hydro and morphological variables from Delft-FM, the hydro-morphodynamics are retrieved every day.
* the coupling and retrieving of the values is specified in the class [Delft3D](.../../reference/hydrodynamics/hydromodels/#delft3d)
* aggregated values are then created in the class [Hydro_Morphodynamics](../../reference/bio_process/vegetation_processes/#src.core.bio_process.veg_hydro_morphodynamics) and retrieved via the method 'get_hydromorph_values'
* aggregated values are then created in the class [Hydro_Morphodynamics](../../reference/bio_process/vegetation_processes/#src.biota_models.vegetation.bio_process.veg_hydro_morphodynamics) and retrieved via the method 'get_hydromorph_values'
* the vegetation dynamics are initiated:
* [Mortality and Growth](../../reference/bio_process/vegetation_processes/#src.core.bio_process.veg_mortality)
* [Mortality and Growth](../../reference/bio_process/vegetation_processes/#src.biota_models.vegetation.bio_process.veg_mortality)
* criteria for mortality and mortality fractions are determined based on the species and the morpho- & hydrodynamics
* vegetation growth is initiated based on the number of growth days within the current ecological time step
* [Colonisation](../../reference/bio_process/vegetation_processes/#src.core.bio_process.veg_colonisation)
* [Colonisation](../../reference/bio_process/vegetation_processes/#src.biota_models.vegetation.bio_process.veg_colonisation)
* method is only called when colonisation is possible during the specific period of the ecological time step
* criteria for colonisation are determined based on the species and the morpho- & hydrodynamics
* the vegetation characteristics of the initial lifestage are updated based on the possible colonisation
* [Update_Lifestages](../../reference/vegetation/vegetation_model/#src.core.vegetation.veg_model)
* [Update_Lifestages](../../reference/vegetation/vegetation_model/#src.biota_models.vegetation.model.veg_model)
* the life stages are updates (initial to juvenile and juvenile to mature)
* initial to juvenile always occurs when new vegetation colonized
* juvenile to mature only occurs when vegetation in the juvenile stage reached the maximum years in that life stage
* if the maximum age of vegetation is reached, the vegetation is removed
* The results are exported using the methods defined in [MapOutput](../../reference/output/vegetation_output/#src.core.output.veg_output_model) and [HisOutput](../../reference/output/vegetation_output/#src.core.output.veg_output_model)
* The results are exported using the methods defined in [MapOutput](../../reference/output/vegetation_output/#src.biota_models.vegetation.output.veg_output_model) and [HisOutput](../../reference/output/vegetation_output/#src.biota_models.vegetation.output.veg_output_model)

* finalize (Finalize simulation)
81 changes: 14 additions & 67 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,22 @@ The project is currently being structured as follows:
guides/ # Contains the documentation related to installation, usage and contribution to this project.
reference/ # Contains references to the modules. Docstrings will be used to generate automatically documentation.
src/
biota_models/ # Module containing all biota species models that inherit or use the modules from core/
coral/ # Module containing the coral model definition.
bioprocess/ # Contains all the different bio processes required by the coral model.
model/ # Defines the coral model and related (such as constants).
output/ # Contains the definition(s) of output parameters to save.
simulation/ # The simulation classes for running different coral configurations.
vegetation/ # Module containing the different vegetation model definitions.
bioprocess/ # Contains all the different bio processes required by the vegetation model.
model/ # Defines the vegetation model and related (such as constants).
output/ # Contains the definition(s) of output parameters to save.
simulation/ # The simulation classes for running different vegetation configurations.
core/ # Module containing all the classes and methods of NBSDynamics.
bio_process/ # The classes describing biophysical processes.
biota/ # The base class biota from which sub models can inherit.
hydrodynamics/ # The different hydrodynamic models ('Transect', 'Delft3D', 'Reef0D', 'Reef1D')
output/ # The output models.
output/ # The base output models.
simulation/ # The base simulation classes.
tools/ # Module containing tools used by the coral_model module.
test/ # Module based on pytest to mirror and test all the classes from src/

Expand All @@ -36,68 +48,3 @@ A summary of the architecture can be seen in the following 'reduced' class diagr

### OutputProtocol
![`OutputProtocol`](./diagrams/general_class_diagram-OutputProtocol.png)


## CoralModel
A biophysical model framework written in Python to make simulations
on coral development based on four environmental factors:
(1) light; (2) flow; (3) temperature; and (4) acidity.
For the hydrodynamics, the model can be coupled to Delft3D Flexible Mesh;
a hydrodynamic model developed at Deltares
([more information](https://oss.deltares.nl/web/delft3dfm)).
To enable this online coupling, certain configurations of Python are required
([more details](#python-code)).

**Note:** This model is still in its beta and further development is still being done.
``coral_model_v0`` is used for the study and is rewritten (``coral_model``) to enhance collaboration.
(The original version has not been written efficiently and is hard to follow for outsiders.)
More information on this version control [here](#version-control).

### Biophysics <a name="biophsics"></a>
This biophysical model framework is part of the result of a
[master thesis](https://repository.tudelft.nl/islandora/object/uuid%3Ae211380e-3f92-4afe-b371-f1e87b0c3bbd?collection=education)
of which the key findings are published in *Environmental Modelling and Software*
(the paper can be found [here](https://www.sciencedirect.com/science/article/pii/S1364815221001468?via%3Dihub)).

The biophysical relations used in the biophysical model framework are mainly process-based,
where for the acidity the proxy of the aragonite saturation state is used.
Furthermore, both photo- and thermal-acclimatisation are included,
which result in a dynamic behaviour of the corals to their environment.
Hence, the corals are modelled such that they can adapt to changing environmental conditions over time.

For more details on the biophysics, reference is made to the
[master thesis](https://repository.tudelft.nl/islandora/object/uuid%3Ae211380e-3f92-4afe-b371-f1e87b0c3bbd?collection=education)
and the [paper](https://www.sciencedirect.com/science/article/pii/S1364815221001468?via%3Dihub) that substitute this
repository.

### Python code <a name="python-code"></a>
The Python code is written in Python 3 and makes use of various packages.
Not all of these packages are automatically included in the standard library of Python,
such as ``NetCDF4`` ([download](http://www.ldf.uci.edu/~gohlke/pythonlibs/#netcdf4)).
In case the biophysical model framework is to be coupled to Delft3d Flexible Mesh,
the ``bmi.wrapper`` package is also required ([download](https://github.com/openearth/bmi-python)).

The settings of Python and other packages for the online coupling to work properly are the following:

* Python version 3.6.5
* NumPy version 1.14.3
* SciPy version 1.1.0
* NetCDF4 version 1.4.2
* Matplotlib version 2.2.2
* BMI-Python

**Note:** These requirements are only required in case the biophysical model framework is to be coupled
with Delft3D Flexible Mesh.


### Version control <a name="version-control"></a>
There are two versions of the CoralModel: ``coral_model_v0`` and ``coral_model``.
The first (``coral_model_v0``) is the original code as used in the study (i.e.
[master thesis](https://repository.tudelft.nl/islandora/object/uuid%3Ae211380e-3f92-4afe-b371-f1e87b0c3bbd?collection=education)
and [paper](https://www.sciencedirect.com/science/article/pii/S1364815221001468?via%3Dihub)).
The latter (``coral_model``) is an updated version, which is rewritten such that it enhances collaboration.
This collaboration was one of the goals to further develop this model,
and the biophysical modelling of coral development.

``coral_model_v0`` will be depreciated in the future, when ``coral_model`` is fully operational
and possibly even incorporates more aspects of coral (reef) development.
Loading