Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ URL: https://github.com/MathMarEcol/zoomss
BugReports: https://github.com/MathMarEcol/zoomss/issues
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
RoxygenNote: 7.3.3
Suggests:
knitr,
rmarkdown,
Expand Down
3 changes: 1 addition & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ knitr::opts_chunk$set(
)
```

# Zooplankton Model of Size Spectrum (ZooMSS)
# Zooplankton Model of Size Spectrum (ZooMSS) <a href="https://MathMarEcol.github.io/zoomss"><img src="man/figures/zoomss.png" align="right" height="139" alt="zoomss website"></a>

<!-- # planktonr <a href='https://github.com/MathMarEcol/zoomss'><img src='man/figures/planktonr.png' align="right" width="139px" /></a> -->
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![Windows](https://github.com/MathMarEcol/zoomss/actions/workflows/Windows.yaml/badge.svg)](https://github.com/MathMarEcol/zoomss/actions/workflows/Windows.yaml)
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# Zooplankton Model of Size Spectrum (ZooMSS)

<!-- # planktonr <a href='https://github.com/MathMarEcol/zoomss'><img src='man/figures/planktonr.png' align="right" width="139px" /></a> -->
# Zooplankton Model of Size Spectrum (ZooMSS) <a href="https://MathMarEcol.github.io/zoomss"><img src="man/figures/zoomss.png" align="right" height="139" alt="zoomss website"></a>

<!-- badges: start -->

Expand Down
3 changes: 2 additions & 1 deletion _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ url: ~
template:
bootstrap: 5
bslib:
primary: "#002F61"
toc: true
toc-expand: 3
bootswatch: cerulean
bootswatch: flatly
reference:
- title: Data
desc: Data related functions and datasets
Expand Down
Binary file added data-raw/Hex/zoomss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data-raw/Hex/zoomss_hexsticker_ocean.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Content not found. Please use links in the navbar.

# Page not found (404)
2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions docs/LICENSE-text.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License

YEAR: 2025
COPYRIGHT HOLDER: zoomss authors
2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions docs/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# MIT License

Copyright (c) 2025 zoomss authors

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions docs/articles/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Articles

### All vignettes

- [Getting started with ZooMSS](zoomss.md):
12 changes: 6 additions & 6 deletions docs/articles/zoomss.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

121 changes: 121 additions & 0 deletions docs/articles/zoomss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Getting started with ZooMSS

``` r

library(zoomss)
library(ggplot2)
```

## Input Data

ZooMSS requires two sets of input data:

1. **Groups** - Contains all taxa-specific parameter values for each
model group, including size ranges and functional group properties.

2. **Environmental data** - A Time-series dataframe with time series of
environmental conditions with `time`, `sst`, and `chl` columns.

## Running the default Model

Get the default published `Groups` dataframe using:

``` r

Groups <- getGroups()
#> Using default ZooMSS functional groups. Use getGroups() to customize.
```

Now create an environmental data time-series using the helper function.
This time-series uses a constant sea surface temperature (`sst`) and
chlorophyll *a* (`chl`) with a 0.1 yr-1 timestep (`dt`).

``` r

env_data <- createInputParams(time = seq(0, 100, by = 0.1) ,
sst = 15,
chl = 0.15)
#> ZooMSS input parameters created:
#> - Time points: 1001 (time values provided)
#> - Time steps: 1000 (intervals to simulate)
#> - Time range: 0 to 100 years
#> - dt = 0.1 years
#> - SST range: 15 to 15 deg C
#> - Chlorophyll range: 0.15 to 0.15 mg/m^3
```

We can look at the environment data and check everything is ok with:

``` r

plotEnvironment(env_data)
```

![](zoomss_files/figure-html/unnamed-chunk-5-1.png)

Now we run ZooMSS and save every `isave` timestep to reduce storage
requirements.

``` r

mdl <- zoomss_model(input_params = env_data, Groups = Groups, isave = 2)
#> Functional groups validation passed
#> Calculating phytoplankton parameters from environmental time series
```

## Plotting

The model includes several built-in plotting functions for analysis and
visualization.

### Time Series Analysis

These plots display total abundance and mean growth/mortality across all
size classes through time.

``` r


library(patchwork)
p1 <- plotTimeSeries(mdl, by = "abundance", transform = "log10") # Plot abundance time series
p2 <- plotTimeSeries(mdl, by = "growth") # Plot growth rate time series
p3 <- plotTimeSeries(mdl, by = "mortality") # Plot predation mortality time series

wrap_plots(p1, p2, p3, nrow = 3, guides = "collect")
```

![](zoomss_files/figure-html/unnamed-chunk-7-1.png)

We can also plot total biomass through time.

``` r

p4 <- plotTimeSeries(mdl, by = "biomass", transform = "log10") + theme(legend.position = "none") # Plot biomass
p5 <- plotTimeSeries(mdl, by = "biomass", type = "stack", transform = "log10") # Plot stacked biomass
p6 <- plotTimeSeries(mdl, by = "biomass", type = "fill") # Plot proportional stacked biomass

wrap_plots(p4, p5, p6, nrow = 3, guides = "collect")
```

![](zoomss_files/figure-html/unnamed-chunk-8-1.png)

### Static Plots for a given model time point

Plot mean species-resolved size spectra for the final `n_years`.

``` r

plotSizeSpectra(mdl, n_years = 10)
#> Averaging final 10 years (50 saved time steps with isave = 2) of abundance from 500 total saved time steps.
```

![](zoomss_files/figure-html/unnamed-chunk-9-1.png)

Plot predator-prey mass ratios for the `idx` timestep

``` r

plotPPMR(mdl, idx = 500) # Plot final timestep
```

![](zoomss_files/figure-html/unnamed-chunk-10-1.png)
Binary file modified docs/articles/zoomss_files/figure-html/unnamed-chunk-8-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions docs/authors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Authors and Citation

## Authors

- **Jason D. Everett**. Author, maintainer.
[](https://orcid.org/0000-0002-6681-8054)

- **Ryan F. Heneghan**. Author.
[](https://orcid.org/0000-0001-7626-1248)

- **Kieran Murphy**. Author. [](https://orcid.org/0000-0002-9697-2458)

- **Anthony J. Richardson**. Author.
[](https://orcid.org/0000-0002-9289-7366)

## Citation

Source:
[`DESCRIPTION`](https://github.com/MathMarEcol/zoomss/blob/HEAD/DESCRIPTION)

Everett J, Heneghan R, Murphy K, Richardson A (2026). *zoomss:
Zooplankton Model of Size Spectra*. R package version 0.1.0,
<https://github.com/MathMarEcol/zoomss>.

@Manual{,
title = {zoomss: Zooplankton Model of Size Spectra},
author = {Jason D. Everett and Ryan F. Heneghan and Kieran Murphy and Anthony J. Richardson},
year = {2026},
note = {R package version 0.1.0},
url = {https://github.com/MathMarEcol/zoomss},
}
4 changes: 2 additions & 2 deletions docs/deps/bootstrap-5.3.1/bootstrap.min.css

Large diffs are not rendered by default.

Loading