Skip to content

Commit

Permalink
update model notebooks towards release 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ben1post committed Jul 21, 2023
1 parent aba4e15 commit 994ec57
Show file tree
Hide file tree
Showing 7 changed files with 780 additions and 446 deletions.
8 changes: 4 additions & 4 deletions notebooks/1_NP_Chemostat_ModelApplication.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "23e697e2cba340188adfecdbfdee7f25",
"model_id": "36def5daea86469f849d58d29687e939",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -372,7 +372,7 @@
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x107fed8a0>"
"<matplotlib.legend.Legend at 0x177cdfa60>"
]
},
"execution_count": 10,
Expand Down Expand Up @@ -407,7 +407,7 @@
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x14177dcc0>]"
"[<matplotlib.lines.Line2D at 0x178f55d80>]"
]
},
"execution_count": 11,
Expand Down Expand Up @@ -466,7 +466,7 @@
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x15de9c610>"
"<matplotlib.legend.Legend at 0x179531000>"
]
},
"execution_count": 13,
Expand Down
230 changes: 82 additions & 148 deletions notebooks/2_NPZD_Slab_ModelApplication.ipynb

Large diffs are not rendered by default.

971 changes: 683 additions & 288 deletions notebooks/3_NPxZx_SizeBased_ModelApplication.ipynb

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions notebooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

Here the first models included within the library are presented in interactive Jupyter notebooks.

The notebooks show all steps from creating the _model setup_ object to analyzing model output and provide a template for further exploration and experimentation with the provided plankton community models.
The notebooks show all steps from creating the _model setup_ object to analyzing model output and provide a template for further exploration and experimentation with the provided plankton community models. More detailed descriptions of the methods are given the manuscript accompanying the release.

## Model applications

The following model applications are included in the Phydra library. All models are embedded in 0-dimensional physical settings.:

- A simple NP (Nutrient-Phytoplankton) model in a chemostat setting.
- A fully configured NPZD (Nutrient-Phytoplankton-Zooplankton-Detritus) model.
- A complex size-structured NPZ model in a simplified physical setting.
- A complex size-structured NPZ model in a simplified physical setting.


## The framework

Xarray-simlab-ODE extends [Xarray-simlab](https://xarray-simlab.readthedocs.io/en/latest/) to allow the modular construction, setup and execution of models based on ordinary differential equations, in an interactive workflow fully compatible with the Python scientific ecosystem through the [Xarray](https://docs.xarray.dev/en/stable/) data framework. You can read more about Xarray-simlab-ODE in the [XSO Documentation on ReadTheDocs](https://xarray-simlab-ode.readthedocs.io/en/latest/index.html).
2 changes: 1 addition & 1 deletion phydra/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .chemostat import NPChemostat, NPChemostat_sinu

from .slabocean import NPZDSlabOcean, NPZDSlabOcean_smith
from .slabocean import NPZDSlabOcean, NPZDSlabOcean_3layer

from .sizebased import NPxZxSizeBased
2 changes: 1 addition & 1 deletion phydra/models/slabocean/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from ._models import NPZDSlabOcean, NPZDSlabOcean_smith
from ._models import NPZDSlabOcean, NPZDSlabOcean_3layer
4 changes: 2 additions & 2 deletions phydra/models/slabocean/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# Growth
'Growth': EMPOWER_Growth_ML,
'Nut_lim': EMPOWER_Monod_ML,
'Light_lim': EMPOWER_Smith_Anderson3Layer_ML,
'Light_lim': EMPOWER_Smith_LambertBeer_ML,
'Temp_lim': EMPOWER_Eppley_ML,

# Grazing
Expand All @@ -49,4 +49,4 @@
'Forcings': StationForcingFromFile,
})

NPZDSlabOcean_smith = NPZDSlabOcean.update_processes({'Light_lim': EMPOWER_Smith_LambertBeer_ML})
NPZDSlabOcean_3layer = NPZDSlabOcean.update_processes({'Light_lim': EMPOWER_Smith_Anderson3Layer_ML})

0 comments on commit 994ec57

Please sign in to comment.