diff --git a/_pkgdown.yml b/_pkgdown.yml index 3592095..4a42180 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,7 +1,7 @@ url: https://MathMarEcol.github.io/zoomss development: mode: devel - destination: docs + destination: / version_label: info version_tooltip: The package is in the early stages of development. Use with caution. reference: diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index 106bc51..0000000 --- a/docs/404.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - -Page not found (404) • zoomss - - - - - - - - Skip to contents - - -
-
-
- -Content not found. Please use links in the navbar. - -
-
- - - -
- - - - - - - diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html deleted file mode 100644 index 77abfab..0000000 --- a/docs/LICENSE-text.html +++ /dev/null @@ -1,57 +0,0 @@ - -License • zoomss - Skip to contents - - -
-
-
- -
YEAR: 2025
-COPYRIGHT HOLDER: zoomss authors
-
- -
- - -
- - - - - - - diff --git a/docs/LICENSE.html b/docs/LICENSE.html deleted file mode 100644 index 75fbeec..0000000 --- a/docs/LICENSE.html +++ /dev/null @@ -1,61 +0,0 @@ - -MIT License • zoomss - Skip to contents - - -
-
-
- -
- -

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.

-
- -
- - -
- - - - - - - diff --git a/docs/articles/index.html b/docs/articles/index.html deleted file mode 100644 index 766e28d..0000000 --- a/docs/articles/index.html +++ /dev/null @@ -1,59 +0,0 @@ - -Articles • zoomss - Skip to contents - - -
-
-
- -
-

All vignettes

-
- -
Getting started with ZooMSS
-
-
-
- - -
- - - - - - - diff --git a/docs/articles/zoomss.html b/docs/articles/zoomss.html deleted file mode 100644 index 3ab6e63..0000000 --- a/docs/articles/zoomss.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - -Getting started with ZooMSS • zoomss - - - - - - - - Skip to contents - - -
- - - - -
-
- - - - -
-

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. -
  3. Environmental data - A Time-series dataframe -with time series of environmental conditions with time, -sst, and chl columns.

  4. -
-
-
-

Running the default Model -

-

Get the default published Groups dataframe using:

-
-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).

-
-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:

-
-plotEnvironment(env_data)
-

-

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

-
-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.

-
-
-library(patchwork)
-p1 <- plotTimeSeries(mdl, by = "abundance") # 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")
-

-

We can also plot total biomass through time.

-
-p4 <- plotTimeSeries(mdl, by = "biomass") + theme(legend.position = "none") # Plot biomass 
-p5 <- plotTimeSeries(mdl, by = "biomass", stacked = TRUE) # Plot stacked biomass 
-p6 <- plotTimeSeries(mdl, by = "biomass", stacked = TRUE, proportion = TRUE) # Plot proportional stacked biomass 
-
-wrap_plots(p4, p5, p6, nrow = 3, guides = "collect")
-

-
-
-

Static Plots for a given model time point -

-

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

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

-

Plot predator-prey mass ratios for the idx timestep

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

-
-
-
-
- - - - -
- - - - - - - diff --git a/docs/articles/zoomss_files/figure-html/unnamed-chunk-3-1.png b/docs/articles/zoomss_files/figure-html/unnamed-chunk-3-1.png deleted file mode 100644 index 3690be3..0000000 Binary files a/docs/articles/zoomss_files/figure-html/unnamed-chunk-3-1.png and /dev/null differ diff --git a/docs/articles/zoomss_files/figure-html/unnamed-chunk-4-1.png b/docs/articles/zoomss_files/figure-html/unnamed-chunk-4-1.png deleted file mode 100644 index eb681c7..0000000 Binary files a/docs/articles/zoomss_files/figure-html/unnamed-chunk-4-1.png and /dev/null differ diff --git a/docs/authors.html b/docs/authors.html deleted file mode 100644 index 217a93f..0000000 --- a/docs/authors.html +++ /dev/null @@ -1,91 +0,0 @@ - -Authors and Citation • zoomss - Skip to contents - - -
-
-
- -
-

Authors

- -
  • -

    Jason D. Everett. Author, maintainer. -

    -
  • -
  • -

    Ryan F. Heneghan. Author. -

    -
  • -
  • -

    Kieran Murphy. Author. -

    -
  • -
  • -

    Anthony J. Richardson. Author. -

    -
  • -
- -
-

Citation

-

Source: DESCRIPTION

- -

Everett J, Heneghan R, Murphy K, Richardson A (2025). -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 = {2025},
-  note = {R package version 0.1.0},
-  url = {https://github.com/MathMarEcol/zoomss},
-}
-
- -
- - -
- - - - - - - diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css deleted file mode 100644 index 5a85941..0000000 --- a/docs/bootstrap-toc.css +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ - -/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ - -/* All levels of nav */ -nav[data-toggle='toc'] .nav > li > a { - display: block; - padding: 4px 20px; - font-size: 13px; - font-weight: 500; - color: #767676; -} -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 19px; - color: #563d7c; - text-decoration: none; - background-color: transparent; - border-left: 1px solid #563d7c; -} -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 18px; - font-weight: bold; - color: #563d7c; - background-color: transparent; - border-left: 2px solid #563d7c; -} - -/* Nav: second level (shown on .active) */ -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} -nav[data-toggle='toc'] .nav .nav > li > a { - padding-top: 1px; - padding-bottom: 1px; - padding-left: 30px; - font-size: 12px; - font-weight: normal; -} -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 29px; -} -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 28px; - font-weight: 500; -} - -/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ -nav[data-toggle='toc'] .nav > .active > ul { - display: block; -} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js deleted file mode 100644 index 1cdd573..0000000 --- a/docs/bootstrap-toc.js +++ /dev/null @@ -1,159 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ -(function() { - 'use strict'; - - window.Toc = { - helpers: { - // return all matching elements in the set, or their descendants - findOrFilter: function($el, selector) { - // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ - // http://stackoverflow.com/a/12731439/358804 - var $descendants = $el.find(selector); - return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); - }, - - generateUniqueIdBase: function(el) { - var text = $(el).text(); - var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); - return anchor || el.tagName.toLowerCase(); - }, - - generateUniqueId: function(el) { - var anchorBase = this.generateUniqueIdBase(el); - for (var i = 0; ; i++) { - var anchor = anchorBase; - if (i > 0) { - // add suffix - anchor += '-' + i; - } - // check if ID already exists - if (!document.getElementById(anchor)) { - return anchor; - } - } - }, - - generateAnchor: function(el) { - if (el.id) { - return el.id; - } else { - var anchor = this.generateUniqueId(el); - el.id = anchor; - return anchor; - } - }, - - createNavList: function() { - return $(''); - }, - - createChildNavList: function($parent) { - var $childList = this.createNavList(); - $parent.append($childList); - return $childList; - }, - - generateNavEl: function(anchor, text) { - var $a = $(''); - $a.attr('href', '#' + anchor); - $a.text(text); - var $li = $('
  • '); - $li.append($a); - return $li; - }, - - generateNavItem: function(headingEl) { - var anchor = this.generateAnchor(headingEl); - var $heading = $(headingEl); - var text = $heading.data('toc-text') || $heading.text(); - return this.generateNavEl(anchor, text); - }, - - // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). - getTopLevel: function($scope) { - for (var i = 1; i <= 6; i++) { - var $headings = this.findOrFilter($scope, 'h' + i); - if ($headings.length > 1) { - return i; - } - } - - return 1; - }, - - // returns the elements for the top level, and the next below it - getHeadings: function($scope, topLevel) { - var topSelector = 'h' + topLevel; - - var secondaryLevel = topLevel + 1; - var secondarySelector = 'h' + secondaryLevel; - - return this.findOrFilter($scope, topSelector + ',' + secondarySelector); - }, - - getNavLevel: function(el) { - return parseInt(el.tagName.charAt(1), 10); - }, - - populateNav: function($topContext, topLevel, $headings) { - var $context = $topContext; - var $prevNav; - - var helpers = this; - $headings.each(function(i, el) { - var $newNav = helpers.generateNavItem(el); - var navLevel = helpers.getNavLevel(el); - - // determine the proper $context - if (navLevel === topLevel) { - // use top level - $context = $topContext; - } else if ($prevNav && $context === $topContext) { - // create a new level of the tree and switch to it - $context = helpers.createChildNavList($prevNav); - } // else use the current $context - - $context.append($newNav); - - $prevNav = $newNav; - }); - }, - - parseOps: function(arg) { - var opts; - if (arg.jquery) { - opts = { - $nav: arg - }; - } else { - opts = arg; - } - opts.$scope = opts.$scope || $(document.body); - return opts; - } - }, - - // accepts a jQuery object, or an options object - init: function(opts) { - opts = this.helpers.parseOps(opts); - - // ensure that the data attribute is in place for styling - opts.$nav.attr('data-toggle', 'toc'); - - var $topContext = this.helpers.createChildNavList(opts.$nav); - var topLevel = this.helpers.getTopLevel(opts.$scope); - var $headings = this.helpers.getHeadings(opts.$scope, topLevel); - this.helpers.populateNav($topContext, topLevel, $headings); - } - }; - - $(function() { - $('nav[data-toggle="toc"]').each(function(i, el) { - var $nav = $(el); - Toc.init($nav); - }); - }); -})(); diff --git a/docs/docsearch.css b/docs/docsearch.css deleted file mode 100644 index e5f1fe1..0000000 --- a/docs/docsearch.css +++ /dev/null @@ -1,148 +0,0 @@ -/* Docsearch -------------------------------------------------------------- */ -/* - Source: https://github.com/algolia/docsearch/ - License: MIT -*/ - -.algolia-autocomplete { - display: block; - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1 -} - -.algolia-autocomplete .ds-dropdown-menu { - width: 100%; - min-width: none; - max-width: none; - padding: .75rem 0; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .1); - box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); -} - -@media (min-width:768px) { - .algolia-autocomplete .ds-dropdown-menu { - width: 175% - } -} - -.algolia-autocomplete .ds-dropdown-menu::before { - display: none -} - -.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { - padding: 0; - background-color: rgb(255,255,255); - border: 0; - max-height: 80vh; -} - -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { - margin-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion { - padding: 0; - overflow: visible -} - -.algolia-autocomplete .algolia-docsearch-suggestion--category-header { - padding: .125rem 1rem; - margin-top: 0; - font-size: 1.3em; - font-weight: 500; - color: #00008B; - border-bottom: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { - float: none; - padding-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { - float: none; - width: auto; - padding: 0; - text-align: left -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content { - float: none; - width: auto; - padding: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content::before { - display: none -} - -.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { - padding-top: .75rem; - margin-top: .75rem; - border-top: 1px solid rgba(0, 0, 0, .1) -} - -.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { - display: block; - padding: .1rem 1rem; - margin-bottom: 0.1; - font-size: 1.0em; - font-weight: 400 - /* display: none */ -} - -.algolia-autocomplete .algolia-docsearch-suggestion--title { - display: block; - padding: .25rem 1rem; - margin-bottom: 0; - font-size: 0.9em; - font-weight: 400 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--text { - padding: 0 1rem .5rem; - margin-top: -.25rem; - font-size: 0.8em; - font-weight: 400; - line-height: 1.25 -} - -.algolia-autocomplete .algolia-docsearch-footer { - width: 110px; - height: 20px; - z-index: 3; - margin-top: 10.66667px; - float: right; - font-size: 0; - line-height: 0; -} - -.algolia-autocomplete .algolia-docsearch-footer--logo { - background-image: url("data:image/svg+xml;utf8,"); - background-repeat: no-repeat; - background-position: 50%; - background-size: 100%; - overflow: hidden; - text-indent: -9000px; - width: 100%; - height: 100%; - display: block; - transform: translate(-8px); -} - -.algolia-autocomplete .algolia-docsearch-suggestion--highlight { - color: #FF8C00; - background: rgba(232, 189, 54, 0.1) -} - - -.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { - box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) -} - -.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { - background-color: rgba(192, 192, 192, .15) -} diff --git a/docs/docsearch.js b/docs/docsearch.js deleted file mode 100644 index b35504c..0000000 --- a/docs/docsearch.js +++ /dev/null @@ -1,85 +0,0 @@ -$(function() { - - // register a handler to move the focus to the search bar - // upon pressing shift + "/" (i.e. "?") - $(document).on('keydown', function(e) { - if (e.shiftKey && e.keyCode == 191) { - e.preventDefault(); - $("#search-input").focus(); - } - }); - - $(document).ready(function() { - // do keyword highlighting - /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ - var mark = function() { - - var referrer = document.URL ; - var paramKey = "q" ; - - if (referrer.indexOf("?") !== -1) { - var qs = referrer.substr(referrer.indexOf('?') + 1); - var qs_noanchor = qs.split('#')[0]; - var qsa = qs_noanchor.split('&'); - var keyword = ""; - - for (var i = 0; i < qsa.length; i++) { - var currentParam = qsa[i].split('='); - - if (currentParam.length !== 2) { - continue; - } - - if (currentParam[0] == paramKey) { - keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); - } - } - - if (keyword !== "") { - $(".contents").unmark({ - done: function() { - $(".contents").mark(keyword); - } - }); - } - } - }; - - mark(); - }); -}); - -/* Search term highlighting ------------------------------*/ - -function matchedWords(hit) { - var words = []; - - var hierarchy = hit._highlightResult.hierarchy; - // loop to fetch from lvl0, lvl1, etc. - for (var idx in hierarchy) { - words = words.concat(hierarchy[idx].matchedWords); - } - - var content = hit._highlightResult.content; - if (content) { - words = words.concat(content.matchedWords); - } - - // return unique words - var words_uniq = [...new Set(words)]; - return words_uniq; -} - -function updateHitURL(hit) { - - var words = matchedWords(hit); - var url = ""; - - if (hit.anchor) { - url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; - } else { - url = hit.url + '?q=' + escape(words.join(" ")); - } - - return url; -} diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index ec2347d..0000000 --- a/docs/index.html +++ /dev/null @@ -1,151 +0,0 @@ - - - - - - - -Zooplankton Model of Size Spectra • zoomss - - - - - - - - - - Skip to contents - - -
    -
    -
    - - - - -
    -

    Overview of ZooMSS -

    -

    The Zooplankton Model of Size Spectra (ZooMSS) is a functional size-spectrum model of the marine ecosystem (following Heneghan et al. 2016) to resolve phytoplankton, nine zooplankton functional groups (heterotrophic flagellates and ciliates, omnivorous and carnivorous copepods, larvaceans, euphausiids, salps, chaetognaths and jellyfish) and three size-based fish groups. Zooplankton functional groups are resolved using their body-size ranges, size-based feeding characteristics and carbon content, and the zooplankton community emerges from the model across global environmental gradients, depending on the functional traits of the different groups.

    -

    We developed the Zooplankton Model of Size Spectra (ZooMSSv2) based on the prototype of Heneghan et al. (2016). ZooMSS uses the functional size-spectrum framework (Blanchard et al., 2017) to resolve the body size ranges, size-based feeding characteristics and carbon content of nine zooplankton groups and three fish groups. The model supports time-varying environmental conditions enabling studies of seasonal cycles, climate change scenarios, and ecosystem responses to environmental variability.

    -

    ZooMSS represents the marine ecosystem as three communities: phytoplankton, zooplankton and fish. The zooplankton community consists of nine of the most abundant zooplankton groups, and the fish community was made up of a small, medium and large group. Dynamics of the phytoplankton are not explicitly resolved in the model, rather the mean size structure of the phytoplankton community is estimated directly from satellite chlorophyll a observations (Brewin et al., 2010; Barnes et al., 2011; Hirata et al., 2011). Abundances of the zooplankton and fish communities are driven by size-dependent processes of growth and mortality, with the temporal dynamics of each functional group governed by separate second-order McKendrick-von Foerster equations.

    -
    -
    -

    Installation -

    -

    You can install the development version of zoomss from GitHub with:

    -
    -# install.packages("pak")
    -pak::pak("MathMarEcol/zoomss")
    -
    -
    -

    Publications -

    -
      -
    1. Heneghan, R.F., Everett, J.D., Blanchard, J.L., Richardson, A.J., 2016. Zooplankton Are Not Fish: Improving Zooplankton Realism in Size-Spectrum Models Mediates Energy Transfer in Food Webs. Front. Mar. Sci. 3, 1–15. https://doi.org/10.3389/fmars.2016.00201

    2. -
    3. Heneghan, R.F., Everett, J.D., Sykes, P., Batten, S.D., Edwards, M., Takahashi, K., Suthers, I.M., Blanchard, J.L., Richardson, A.J., in review, A global size-spectrum model of the marine ecosystem that resolves zooplankton composition. Ecological Modelling

    4. -
    -
    -
    -

    Getting Help -

    -

    If you encounter problems running the model, raise an issue on GitHub: https://github.com/MathMarEcol/ZoopSizeSpectraModel/issues

    -

    If you find errors or want to improve the model, we’d love you to make the changes and submit a pull request for us to review and approve.

    -
    -
    -
    -
    - - -
    - - - -
    -
    - - - - - - - diff --git a/docs/link.svg b/docs/link.svg deleted file mode 100644 index 88ad827..0000000 --- a/docs/link.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/docs/pkgdown.css b/docs/pkgdown.css deleted file mode 100644 index 80ea5b8..0000000 --- a/docs/pkgdown.css +++ /dev/null @@ -1,384 +0,0 @@ -/* Sticky footer */ - -/** - * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ - * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css - * - * .Site -> body > .container - * .Site-content -> body > .container .row - * .footer -> footer - * - * Key idea seems to be to ensure that .container and __all its parents__ - * have height set to 100% - * - */ - -html, body { - height: 100%; -} - -body { - position: relative; -} - -body > .container { - display: flex; - height: 100%; - flex-direction: column; -} - -body > .container .row { - flex: 1 0 auto; -} - -footer { - margin-top: 45px; - padding: 35px 0 36px; - border-top: 1px solid #e5e5e5; - color: #666; - display: flex; - flex-shrink: 0; -} -footer p { - margin-bottom: 0; -} -footer div { - flex: 1; -} -footer .pkgdown { - text-align: right; -} -footer p { - margin-bottom: 0; -} - -img.icon { - float: right; -} - -/* Ensure in-page images don't run outside their container */ -.contents img { - max-width: 100%; - height: auto; -} - -/* Fix bug in bootstrap (only seen in firefox) */ -summary { - display: list-item; -} - -/* Typographic tweaking ---------------------------------*/ - -.contents .page-header { - margin-top: calc(-60px + 1em); -} - -dd { - margin-left: 3em; -} - -/* Section anchors ---------------------------------*/ - -a.anchor { - display: none; - margin-left: 5px; - width: 20px; - height: 20px; - - background-image: url(./link.svg); - background-repeat: no-repeat; - background-size: 20px 20px; - background-position: center center; -} - -h1:hover .anchor, -h2:hover .anchor, -h3:hover .anchor, -h4:hover .anchor, -h5:hover .anchor, -h6:hover .anchor { - display: inline-block; -} - -/* Fixes for fixed navbar --------------------------*/ - -.contents h1, .contents h2, .contents h3, .contents h4 { - padding-top: 60px; - margin-top: -40px; -} - -/* Navbar submenu --------------------------*/ - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu>.dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover>.dropdown-menu { - display: block; -} - -.dropdown-submenu>a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: #cccccc; - margin-top: 5px; - margin-right: -10px; -} - -.dropdown-submenu:hover>a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left>.dropdown-menu { - left: -100%; - margin-left: 10px; - border-radius: 6px 0 6px 6px; -} - -/* Sidebar --------------------------*/ - -#pkgdown-sidebar { - margin-top: 30px; - position: -webkit-sticky; - position: sticky; - top: 70px; -} - -#pkgdown-sidebar h2 { - font-size: 1.5em; - margin-top: 1em; -} - -#pkgdown-sidebar h2:first-child { - margin-top: 0; -} - -#pkgdown-sidebar .list-unstyled li { - margin-bottom: 0.5em; -} - -/* bootstrap-toc tweaks ------------------------------------------------------*/ - -/* All levels of nav */ - -nav[data-toggle='toc'] .nav > li > a { - padding: 4px 20px 4px 6px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; -} - -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 5px; - color: inherit; - border-left: 1px solid #878787; -} - -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 5px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; - border-left: 2px solid #878787; -} - -/* Nav: second level (shown on .active) */ - -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} - -nav[data-toggle='toc'] .nav .nav > li > a { - padding-left: 16px; - font-size: 1.35rem; -} - -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 15px; -} - -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 15px; - font-weight: 500; - font-size: 1.35rem; -} - -/* orcid ------------------------------------------------------------------- */ - -.orcid { - font-size: 16px; - color: #A6CE39; - /* margins are required by official ORCID trademark and display guidelines */ - margin-left:4px; - margin-right:4px; - vertical-align: middle; -} - -/* Reference index & topics ----------------------------------------------- */ - -.ref-index th {font-weight: normal;} - -.ref-index td {vertical-align: top; min-width: 100px} -.ref-index .icon {width: 40px;} -.ref-index .alias {width: 40%;} -.ref-index-icons .alias {width: calc(40% - 40px);} -.ref-index .title {width: 60%;} - -.ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} -.ref-arguments .name {width: 20%;} -.ref-arguments .desc {width: 80%;} - -/* Nice scrolling for wide elements --------------------------------------- */ - -table { - display: block; - overflow: auto; -} - -/* Syntax highlighting ---------------------------------------------------- */ - -pre, code, pre code { - background-color: #f8f8f8; - color: #333; -} -pre, pre code { - white-space: pre-wrap; - word-break: break-all; - overflow-wrap: break-word; -} - -pre { - border: 1px solid #eee; -} - -pre .img, pre .r-plt { - margin: 5px 0; -} - -pre .img img, pre .r-plt img { - background-color: #fff; -} - -code a, pre a { - color: #375f84; -} - -a.sourceLine:hover { - text-decoration: none; -} - -.fl {color: #1514b5;} -.fu {color: #000000;} /* function */ -.ch,.st {color: #036a07;} /* string */ -.kw {color: #264D66;} /* keyword */ -.co {color: #888888;} /* comment */ - -.error {font-weight: bolder;} -.warning {font-weight: bolder;} - -/* Clipboard --------------------------*/ - -.hasCopyButton { - position: relative; -} - -.btn-copy-ex { - position: absolute; - right: 0; - top: 0; - visibility: hidden; -} - -.hasCopyButton:hover button.btn-copy-ex { - visibility: visible; -} - -/* headroom.js ------------------------ */ - -.headroom { - will-change: transform; - transition: transform 200ms linear; -} -.headroom--pinned { - transform: translateY(0%); -} -.headroom--unpinned { - transform: translateY(-100%); -} - -/* mark.js ----------------------------*/ - -mark { - background-color: rgba(255, 255, 51, 0.5); - border-bottom: 2px solid rgba(255, 153, 51, 0.3); - padding: 1px; -} - -/* vertical spacing after htmlwidgets */ -.html-widget { - margin-bottom: 10px; -} - -/* fontawesome ------------------------ */ - -.fab { - font-family: "Font Awesome 5 Brands" !important; -} - -/* don't display links in code chunks when printing */ -/* source: https://stackoverflow.com/a/10781533 */ -@media print { - code a:link:after, code a:visited:after { - content: ""; - } -} - -/* Section anchors --------------------------------- - Added in pandoc 2.11: https://github.com/jgm/pandoc-templates/commit/9904bf71 -*/ - -div.csl-bib-body { } -div.csl-entry { - clear: both; -} -.hanging-indent div.csl-entry { - margin-left:2em; - text-indent:-2em; -} -div.csl-left-margin { - min-width:2em; - float:left; -} -div.csl-right-inline { - margin-left:2em; - padding-left:1em; -} -div.csl-indent { - margin-left: 2em; -} diff --git a/docs/pkgdown.js b/docs/pkgdown.js deleted file mode 100644 index 1a99c65..0000000 --- a/docs/pkgdown.js +++ /dev/null @@ -1,162 +0,0 @@ -/* http://gregfranko.com/blog/jquery-best-practices/ */ -(function($) { - $(function() { - - $('nav.navbar').headroom(); - - Toc.init({ - $nav: $("#toc"), - $scope: $("main h2, main h3, main h4, main h5, main h6") - }); - - if ($('#toc').length) { - $('body').scrollspy({ - target: '#toc', - offset: $("nav.navbar").outerHeight() + 1 - }); - } - - // Activate popovers - $('[data-bs-toggle="popover"]').popover({ - container: 'body', - html: true, - trigger: 'focus', - placement: "top", - sanitize: false, - }); - - $('[data-bs-toggle="tooltip"]').tooltip(); - - /* Clipboard --------------------------*/ - - function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-bs-original-title'); - element.setAttribute('data-bs-original-title', msg); - $(element).tooltip('show'); - element.setAttribute('data-bs-original-title', tooltipOriginalTitle); - } - - if(ClipboardJS.isSupported()) { - $(document).ready(function() { - var copyButton = ""; - - $("div.sourceCode").addClass("hasCopyButton"); - - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); - - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); - - // Initialize clipboard: - var clipboard = new ClipboardJS('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent.replace(/\n#>[^\n]*/g, ""); - } - }); - - clipboard.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); - - clipboard.on('error', function(e) { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); - }); - - }); - } - - /* Search marking --------------------------*/ - var url = new URL(window.location.href); - var toMark = url.searchParams.get("q"); - var mark = new Mark("main#main"); - if (toMark) { - mark.mark(toMark, { - accuracy: { - value: "complementary", - limiters: [",", ".", ":", "/"], - } - }); - } - - /* Search --------------------------*/ - /* Adapted from https://github.com/rstudio/bookdown/blob/2d692ba4b61f1e466c92e78fd712b0ab08c11d31/inst/resources/bs4_book/bs4_book.js#L25 */ - // Initialise search index on focus - var fuse; - $("#search-input").focus(async function(e) { - if (fuse) { - return; - } - - $(e.target).addClass("loading"); - var response = await fetch($("#search-input").data("search-index")); - var data = await response.json(); - - var options = { - keys: ["what", "text", "code"], - ignoreLocation: true, - threshold: 0.1, - includeMatches: true, - includeScore: true, - }; - fuse = new Fuse(data, options); - - $(e.target).removeClass("loading"); - }); - - // Use algolia autocomplete - var options = { - autoselect: true, - debug: true, - hint: false, - minLength: 2, - }; - var q; -async function searchFuse(query, callback) { - await fuse; - - var items; - if (!fuse) { - items = []; - } else { - q = query; - var results = fuse.search(query, { limit: 20 }); - items = results - .filter((x) => x.score <= 0.75) - .map((x) => x.item); - if (items.length === 0) { - items = [{dir:"Sorry 😿",previous_headings:"",title:"No results found.",what:"No results found.",path:window.location.href}]; - } - } - callback(items); -} - $("#search-input").autocomplete(options, [ - { - name: "content", - source: searchFuse, - templates: { - suggestion: (s) => { - if (s.title == s.what) { - return `${s.dir} >
    ${s.title}
    `; - } else if (s.previous_headings == "") { - return `${s.dir} >
    ${s.title}
    > ${s.what}`; - } else { - return `${s.dir} >
    ${s.title}
    > ${s.previous_headings} > ${s.what}`; - } - }, - }, - }, - ]).on('autocomplete:selected', function(event, s) { - window.location.href = s.path + "?q=" + q + "#" + s.id; - }); - }); -})(window.jQuery || window.$) - -document.addEventListener('keydown', function(event) { - // Check if the pressed key is '/' - if (event.key === '/') { - event.preventDefault(); // Prevent any default action associated with the '/' key - document.getElementById('search-input').focus(); // Set focus to the search input - } -}); diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml deleted file mode 100644 index 4537f40..0000000 --- a/docs/pkgdown.yml +++ /dev/null @@ -1,9 +0,0 @@ -pandoc: '3.4' -pkgdown: 2.1.3 -pkgdown_sha: ~ -articles: - zoomss: zoomss.html -last_built: 2025-08-21T03:22Z -urls: - reference: https://MathMarEcol.github.io/zoomss/reference - article: https://MathMarEcol.github.io/zoomss/articles diff --git a/docs/reference/GroupInputs-1.png b/docs/reference/GroupInputs-1.png deleted file mode 100644 index 6a0e009..0000000 Binary files a/docs/reference/GroupInputs-1.png and /dev/null differ diff --git a/docs/reference/GroupInputs.html b/docs/reference/GroupInputs.html deleted file mode 100644 index fb2382a..0000000 --- a/docs/reference/GroupInputs.html +++ /dev/null @@ -1,177 +0,0 @@ - -Default functional groups for the ZooMSS model — GroupInputs • zoomss - Skip to contents - - -
    -
    -
    - -
    -

    A dataset containing the biological parameters for different -functional groups used in the ZooMSS size-structured marine ecosystem model. -These represent various taxa from flagellates to large fish, each defined -by their feeding behavior, size ranges, and physiological parameters.

    -
    - -
    -

    Usage

    -
    GroupInputs
    -
    - -
    -

    Format

    -

    A data frame with 12 rows (functional groups) and 19 columns:

    Species
    -

    Character. Name of the functional group/taxa

    - -
    Type
    -

    Character. Broad category (Zooplankton or Fish)

    - -
    FeedType
    -

    Character. Feeding strategy (Heterotroph, FilterFeeder, Omnivore, Carnivore)

    - -
    Prop
    -

    Numeric. Initial proportion of total biomass

    - -
    W0
    -

    Numeric. Log10 minimum body weight (g) for the group

    - -
    Wmax
    -

    Numeric. Log10 maximum body weight (g) for the group

    - -
    Wmat
    -

    Numeric. Log10 maturation body weight (g)

    - -
    SearchCoef
    -

    Numeric. Search coefficient for predation interactions

    - -
    SearchExp
    -

    Numeric. Search exponent for predation scaling

    - -
    PPMRscale
    -

    Numeric. Predator-prey mass ratio scaling parameter

    - -
    PPMR
    -

    Numeric. Predator-prey mass ratio (for fish groups)

    - -
    FeedWidth
    -

    Numeric. Feeding kernel width parameter

    - -
    GrossGEscale
    -

    Numeric. Gross growth efficiency scaling

    - -
    Carbon
    -

    Numeric. Carbon content proportion

    - -
    Repro
    -

    Numeric. Reproduction parameter

    - -
    Fmort
    -

    Numeric. Fishing mortality rate

    - -
    Fmort_W0
    -

    Numeric. Log10 minimum weight for fishing mortality

    - -
    Fmort_Wmax
    -

    Numeric. Log10 maximum weight for fishing mortality

    - -
    PlotColour
    -

    Character. Color code for plotting the functional group

    - - -
    -
    -

    Source

    -

    Marine ecological literature and ZooMSS model development

    -
    -
    -

    Details

    -

    ZooMSS Functional Groups Data

    -

    The GroupInputs dataset defines 12 functional groups spanning from -small microzooplankton (flagellates, ciliates) through various mesozooplankton -groups (copepods, euphausiids, chaetognaths) to gelatinous zooplankton (salps, jellyfish) -and three fish size classes (small, medium, large). Each group is characterized by:

    • Size ranges: W0 to Wmax define the body size spectrum

    • -
    • Feeding behavior: Different strategies for resource acquisition

    • -
    • Interaction parameters: Search rates and predator-prey relationships

    • -
    • Physiological rates: Growth efficiency and carbon content

    • -

    These parameters are based on marine ecological literature and represent -typical values for temperate marine ecosystems.

    -
    - -
    -

    Examples

    -
    data(GroupInputs)
    -head(GroupInputs)
    -#> # A tibble: 6 × 19
    -#>   Species  Type  FeedType  Prop    W0  Wmax  Wmat SearchCoef SearchExp PPMRscale
    -#>   <chr>    <chr> <chr>    <dbl> <dbl> <dbl> <dbl>      <dbl>     <dbl>     <dbl>
    -#> 1 Flagell… Zoop… Heterot…  0.1  -12    -6.8  -8.8        640       0.8      1.5 
    -#> 2 Ciliates Zoop… Heterot…  0.1   -9.3  -6.3  -8.3        640       0.8      0.04
    -#> 3 Larvace… Zoop… FilterF…  0.1   -6.4  -3.2  -5.2        640       0.8     -3   
    -#> 4 OmniCop… Zoop… Omnivore  0.04  -7.5  -3.5  -5.5        640       0.8     -0.5 
    -#> 5 CarnCop… Zoop… Carnivo…  0.06  -7.5  -2.5  -4.5        640       0.8      1.5 
    -#> 6 Euphaus… Zoop… Omnivore  0.1   -4.2   0.2  -1.8        640       0.8     -2   
    -#> # ℹ 9 more variables: PPMR <dbl>, FeedWidth <dbl>, GrossGEscale <dbl>,
    -#> #   Carbon <dbl>, Repro <dbl>, Fmort <dbl>, Fmort_W0 <dbl>, Fmort_Wmax <dbl>,
    -#> #   PlotColour <chr>
    -
    -# View size ranges across groups
    -plot(GroupInputs$W0, GroupInputs$Wmax, 
    -     col = GroupInputs$PlotColour,
    -     xlab = "Log10 Min Weight", ylab = "Log10 Max Weight")
    -text(GroupInputs$W0, GroupInputs$Wmax, GroupInputs$Species, pos = 3, cex = 0.7)
    -
    -
    -
    -
    - - -
    - - - -
    - - - - - - - diff --git a/docs/reference/index.html b/docs/reference/index.html deleted file mode 100644 index 99cd813..0000000 --- a/docs/reference/index.html +++ /dev/null @@ -1,259 +0,0 @@ - -Package index • zoomss - Skip to contents - - -
    -
    -
    - -
    -

    Data

    - -

    Data related functions and datasets

    - - -
    - - - - -
    - - GroupInputs - -
    -
    Default functional groups for the ZooMSS model
    -
    - - getGroups() - -
    -
    Load default or custom functional groups for ZooMSS model
    -
    - - calculatePhytoParam() - -
    -
    Calculate phytoplankton abundance spectrum from chlorophyll data
    -
    - - createEnviroData() - -
    -
    Generate synthetic environmental data for ZooMSS testing
    -
    - - createInputParams() - -
    -
    Create input parameters data frame for ZooMSS model runs
    -
    - - validateGroups() - -
    -
    Validate ZooMSS functional groups data structure and values
    -
    -

    Model Runs

    - -

    Functions for running the model

    - - -
    - - - - -
    - - zoomss_model() - -
    -
    Main ZooMSS model function for complete simulations
    -
    - - zoomss_mvf() - -
    -
    Solve McKendrick-von Foerster equation for size-structured populations
    -
    - - zoomss_params() - -
    -
    Initialize and validate ZooMSS model parameters
    -
    - - zoomss_run() - -
    -
    Execute the main ZooMSS simulation loop with dynamic environmental forcing
    -
    - - zoomss_setup() - -
    -
    Initialize ZooMSS model components and calculate feeding interactions
    -
    -

    Plotting

    - -

    Functions for plotting.

    - - -
    - - - - -
    - - plotEnvironment() - -
    -
    Plot environmental forcing data
    -
    - - plotPPMR() - -
    -
    Visualize predator-prey mass ratio patterns in ZooMSS results
    -
    - - plotSizeSpectra() - -
    -
    Visualize abundance size spectra across functional groups
    -
    - - plotTimeSeries() - -
    -
    Unified function to visualize time series changes for different metrics
    -
    -

    Data wrangling

    - -

    Helper functions to convert units and data format

    - - -
    - - - - -
    - - averageTimeSeries() - -
    -
    Calculate mean of final portion of ZooMSS time series
    -
    - - extractPPMR() - -
    -
    Calculate predator-prey mass ratio data for visualization
    -
    - - extractSizeRange() - -
    -
    Extract specific size class range from model variable
    -
    - - extractTrophicLevels() - -
    -
    Compute trophic levels for functional groups using diet composition
    -
    - - getBiomass() - -
    -
    Convert ZooMSS abundance matrices to biomass by multiplying by body weights
    -
    - - getGroups() - -
    -
    Load default or custom functional groups for ZooMSS model
    -
    - - reduceAll() - -
    -
    Sum abundances across all groups and size classes
    -
    - - reduceSize() - -
    -
    Aggregate ZooMSS abundances across all size classes
    -
    - - reduceSpecies() - -
    -
    Aggregate ZooMSS abundances across all functional groups
    -
    -

    Private functions

    - -

    Functions to be unexported

    - - -
    - - - - -
    - - untibble() - -
    -
    Convert tibble to data frame for efficiency
    -
    -
    - - -
    - - - -
    - - - - - - - diff --git a/docs/reference/pipe.html b/docs/reference/pipe.html deleted file mode 100644 index 18dc753..0000000 --- a/docs/reference/pipe.html +++ /dev/null @@ -1,81 +0,0 @@ - -Pipe operator — %>% • zoomss - Skip to contents - - -
    -
    -
    - -
    -

    See magrittr::%>% for details.

    -
    - -
    -

    Usage

    -
    lhs %>% rhs
    -
    - -
    -

    Arguments

    - - -
    lhs
    -

    A value or the magrittr placeholder.

    - - -
    rhs
    -

    A function call using the magrittr semantics.

    - -
    -
    -

    Value

    -

    The result of calling rhs(lhs).

    -
    - -
    - - -
    - - - -
    - - - - - - - diff --git a/docs/reference/untibble.html b/docs/reference/untibble.html deleted file mode 100644 index 1258d79..0000000 --- a/docs/reference/untibble.html +++ /dev/null @@ -1,87 +0,0 @@ - -Convert tibble to data frame for efficiency — untibble • zoomss - Skip to contents - - -
    -
    -
    - -
    -

    Removes tibble attributes and converts to a plain data frame -for improved speed and memory efficiency in computational workflows.

    -
    - -
    -

    Usage

    -
    untibble(tibble)
    -
    - -
    -

    Arguments

    - - -
    tibble
    -

    A tibble or data frame object to convert

    - -
    -
    -

    Value

    -

    Plain data frame without tibble attributes

    -
    -
    -

    Details

    -

    Remove Tibble Attributes

    -

    This utility function strips tibble-specific attributes that can -slow down operations in tight computational loops. Used internally by -ZooMSS for performance optimization when working with large datasets.

    -
    - -
    - - -
    - - - -
    - - - - - - - diff --git a/docs/reference/zAveOutput.html b/docs/reference/zAveOutput.html deleted file mode 100644 index 50d7090..0000000 --- a/docs/reference/zAveOutput.html +++ /dev/null @@ -1,103 +0,0 @@ - -Calculate mean of final portion of ZooMSS time series — zAveOutput • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Calculates the mean of the final portion (default 50%) of a time series -to obtain equilibrium values after model spin-up period.

    -
    - -
    -
    zAveOutput(x, prop = 0.5)
    -
    - -
    -

    Arguments

    - - -
    x
    -

    3D array with dimensions (time, groups, size_classes)

    - - -
    prop
    -

    Proportion of final time series to average (default: 0.5)

    - -
    -
    -

    Value

    -

    2D array with averaged values (groups x size_classes)

    -
    -
    -

    Details

    -

    Calculate Average Output from Model Time Series

    -

    This function removes the initial transient period from time series data -and calculates the mean of the remaining portion, providing representative -steady-state values. Essential for obtaining equilibrium abundances, growth rates, -and other model outputs after the model has reached dynamic equilibrium.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zBiomass.html b/docs/reference/zBiomass.html deleted file mode 100644 index 0356e84..0000000 --- a/docs/reference/zBiomass.html +++ /dev/null @@ -1,102 +0,0 @@ - -Convert ZooMSS abundance matrices to biomass by multiplying by body weights — getBiomass • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Converts abundance data to wet weight biomass by multiplying abundances -by the corresponding body weights for each size class.

    -
    - -
    -
    getBiomass(res, vmdl)
    -
    - -
    -

    Arguments

    - - -
    res
    -

    List of abundance matrices from ZooMSS output

    - - -
    vmdl
    -

    ZooMSS model object containing weight vector (param$w)

    - -
    -
    -

    Value

    -

    List of biomass matrices in grams wet weight

    -
    -
    -

    Details

    -

    Convert Abundance to Biomass

    -

    This function transforms abundance matrices to biomass by applying the -weight vector across size classes. Essential for analyses requiring biomass -units rather than abundance counts.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zCalculatePhytoParam.html b/docs/reference/zCalculatePhytoParam.html deleted file mode 100644 index db4d1a8..0000000 --- a/docs/reference/zCalculatePhytoParam.html +++ /dev/null @@ -1,114 +0,0 @@ - -Calculate phytoplankton abundance spectrum from chlorophyll data — calculatePhytoParam • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Converts chlorophyll concentration data to phytoplankton size spectrum -parameters (slope, intercept, maximum size) using established oceanographic relationships.

    -
    - -
    -
    calculatePhytoParam(df)
    -
    - -
    -

    Arguments

    - - -
    df
    -

    Data frame containing chlorophyll data (chl column in mg/m^3) and -optionally phytoplankton biomass (phy column in g/m^3)

    - -
    -
    -

    Value

    -

    Data frame with added columns:

    • phyto_slope: Power law slope for phytoplankton size spectrum

    • -
    • phyto_int: Log10 intercept for phytoplankton abundance

    • -
    • phyto_max: Maximum phytoplankton size (log10 grams)

    • -
    • pico_biom, nano_biom, micro_biom: Biomass in each size class

    • -
    -
    -

    Details

    -

    Calculate Phytoplankton Size Spectrum Parameters

    -

    This function implements the Brewin et al. (2015) algorithm to partition -chlorophyll among picophytoplankton, nanophytoplankton, and microphytoplankton size -classes, then calculates:

    • Size spectrum slope and intercept parameters

    • -
    • Maximum phytoplankton size based on micro proportion

    • -
    • Biomass estimates for each size class

    • -

    These parameters drive the dynamic phytoplankton spectrum in ZooMSS that serves -as the base of the food web. The function can work with either chlorophyll-only -data (using empirical relationships) or direct phytoplankton biomass measurements.

    -
    -
    -

    References

    -

    Brewin, R.J.W., et al. (2015). A three-component model of phytoplankton size class -for the Atlantic Ocean. Ecological Modelling, 306, 90-101.

    -

    Maranon, E., et al. (2014). Resource supply overrides temperature as a controlling -factor of marine phytoplankton growth. PLoS ONE, 9(6), e99312.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zCarbonBiomass.html b/docs/reference/zCarbonBiomass.html deleted file mode 100644 index 37e3957..0000000 --- a/docs/reference/zCarbonBiomass.html +++ /dev/null @@ -1,103 +0,0 @@ - -Convert ZooMSS abundances to carbon biomass across all size classes — zCarbonBiomass • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Converts abundance data to carbon biomass by multiplying by body weights -and then by carbon content factors for each functional group.

    -
    - -
    -
    zCarbonBiomass(res, vmdl)
    -
    - -
    -

    Arguments

    - - -
    res
    -

    List of abundance matrices from ZooMSS output

    - - -
    vmdl
    -

    ZooMSS model object containing weight vector and carbon content factors

    - -
    -
    -

    Value

    -

    List of carbon biomass matrices (grams carbon)

    -
    -
    -

    Details

    -

    Convert Abundance to Carbon Biomass

    -

    This function performs a two-step conversion:

    1. Abundance to wet weight biomass (using body weights)

    2. -
    3. Wet weight to carbon biomass (using group-specific carbon content)

    4. -

    Carbon biomass is essential for biogeochemical analyses and comparisons -with field data that are often reported in carbon units.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zConvert2Tibble.html b/docs/reference/zConvert2Tibble.html deleted file mode 100644 index 8a0925d..0000000 --- a/docs/reference/zConvert2Tibble.html +++ /dev/null @@ -1,102 +0,0 @@ - -Convert ZooMSS list output to tibble with species names — zConvert2Tibble • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Converts ZooMSS list output to a tibble format with proper column -names based on functional group species names.

    -
    - -
    -
    zConvert2Tibble(li, vmdl)
    -
    - -
    -

    Arguments

    - - -
    li
    -

    List of vectors/matrices from ZooMSS aggregation functions

    - - -
    vmdl
    -

    ZooMSS model object containing species names (param$Groups$Species)

    - -
    -
    -

    Value

    -

    Tibble with columns named by species and rows representing spatial cells

    -
    -
    -

    Details

    -

    Convert List to Tibble Format

    -

    This function converts aggregated ZooMSS output (typically from -reduceSize or similar functions) into a tibble format suitable for -analysis and visualization. Currently designed for 2D data (species x cells).

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zCreateInputs.html b/docs/reference/zCreateInputs.html deleted file mode 100644 index 939833f..0000000 --- a/docs/reference/zCreateInputs.html +++ /dev/null @@ -1,130 +0,0 @@ - -Create input parameters data frame for ZooMSS model runs — createInputParams • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Creates a properly formatted input parameters data frame for ZooMSS model -simulations, combining temporal parameters with environmental time series data.

    -
    - -
    -
    createInputParams(time, sst, chl, cellID = NULL)
    -
    - -
    -

    Arguments

    - - -
    time
    -

    Numeric vector of time values in years (must be increasing and uniform, can start at any value)

    - - -
    sst
    -

    Numeric vector of sea surface temperature values in deg C

    - - -
    chl
    -

    Numeric vector of chlorophyll concentration values in mg/m^3

    - - -
    cellID
    -

    Optional numeric vector of cell identifiers for spatial data (default: NULL)

    - -
    -
    -

    Value

    -

    Data frame with columns: time, time_step, sst, chl, and cellID (if provided)

    -
    -
    -

    Details

    -

    Create ZooMSS Input Parameters Object

    -

    This function combines environmental time series (SST and chlorophyll) with -time data to create the input_params object required by zoomss_model(). -The function performs validation checks using assertthat to ensure:

    • All input vectors are numeric and of equal length

    • -
    • SST values are within reasonable ocean range (-2 to 35 deg C)

    • -
    • Chlorophyll values are positive and within typical range (0 to 50 mg/m^3)

    • -
    • Time values are increasing and reasonable

    • -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# Create simple environmental time series
    -time_vec <- seq(0, 10, 0.01)  # 10 years with 0.01 year time steps
    -sst_vec <- 15 + 3*sin(2*pi*time_vec/1)  # annual cycle
    -chl_vec <- 0.5 + 0.2*cos(2*pi*time_vec/1)  # annual cycle
    -
    -# Create input parameters object
    -input_params <- createInputParams(time_vec, sst_vec, chl_vec)
    -
    -# Use with ZooMSS model
    -results <- zoomss_model(input_params, Groups, isave = 50)
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zCreateSimpleTimeSeries.html b/docs/reference/zCreateSimpleTimeSeries.html deleted file mode 100644 index 796a1be..0000000 --- a/docs/reference/zCreateSimpleTimeSeries.html +++ /dev/null @@ -1,157 +0,0 @@ - -Generate synthetic environmental data for ZooMSS testing — createEnviroData • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Creates simple synthetic environmental time series with optional seasonal -variation for testing ZooMSS model runs when real environmental data is not available.

    -
    - -
    -
    createEnviroData(
    -  n_time_steps,
    -  dt,
    -  base_sst = 15,
    -  base_chl = 0.5,
    -  seasonal = TRUE,
    -  sst_amplitude = 3,
    -  chl_amplitude = 0.2
    -)
    -
    - -
    -

    Arguments

    - - -
    n_time_steps
    -

    Number of time steps to generate

    - - -
    dt
    -

    Time step size in years

    - - -
    base_sst
    -

    Base sea surface temperature in deg C (default: 15)

    - - -
    base_chl
    -

    Base chlorophyll concentration in mg/m^3 (default: 0.5)

    - - -
    seasonal
    -

    Logical, whether to add seasonal variation (default: TRUE)

    - - -
    sst_amplitude
    -

    Amplitude of SST seasonal variations in deg C (default: 3)

    - - -
    chl_amplitude
    -

    Amplitude of chlorophyll seasonal variations in mg/m^3 (default: 0.2)

    - -
    -
    -

    Value

    -

    Data frame with columns: time, sst, chl

    -
    -
    -

    Details

    -

    Create Simple Environmental Time Series for Testing

    -

    This function generates synthetic sea surface temperature and chlorophyll -time series that can be used for testing ZooMSS model behavior. The function can -create either static environmental conditions or seasonal cycles with sinusoidal -variation. This is particularly useful for:

    • Testing model sensitivity to environmental forcing

    • -
    • Creating idealized scenarios for model exploration

    • -
    • Generating data when real environmental data is unavailable

    • -

    The seasonal option creates SST and chlorophyll cycles that are out of phase, -mimicking typical ocean patterns where chlorophyll peaks when SST is lower.

    -
    - -
    -

    Examples

    -
    # Create seasonal environmental data
    -env_data <- createEnviroData(
    -  n_time_steps = 1000,
    -  dt = 0.01,
    -  seasonal = TRUE
    -)
    -#> Error in createEnviroData(n_time_steps = 1000, dt = 0.01, seasonal = TRUE): unused argument (n_time_steps = 1000)
    -
    -# Create static environmental conditions
    -static_data <- createEnviroData(
    -  n_time_steps = 500,
    -  dt = 0.01,
    -  seasonal = FALSE,
    -  base_sst = 20,
    -  base_chl = 1.0
    -)
    -#> Error in createEnviroData(n_time_steps = 500, dt = 0.01, seasonal = FALSE,     base_sst = 20, base_chl = 1): unused argument (n_time_steps = 500)
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zExtractSizeRange.html b/docs/reference/zExtractSizeRange.html deleted file mode 100644 index 328af8a..0000000 --- a/docs/reference/zExtractSizeRange.html +++ /dev/null @@ -1,107 +0,0 @@ - -Extract specific size class range from abundance matrices — extractSizeRange • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Subsets ZooMSS output to include only specified size classes, -useful for focusing analysis on particular size ranges.

    -
    - -
    -
    extractSizeRange(list_in, minb, maxb)
    -
    - -
    -

    Arguments

    - - -
    list_in
    -

    List of abundance matrices from ZooMSS output

    - - -
    minb
    -

    Minimum size class index to extract

    - - -
    maxb
    -

    Maximum size class index to extract

    - -
    -
    -

    Value

    -

    List of abundance matrices with only specified size classes

    -
    -
    -

    Details

    -

    Extract Size Range from ZooMSS Output

    -

    This function extracts a subset of size classes from the full -ZooMSS output matrices. Useful for analyzing specific size ranges -(e.g., microzooplankton, mesozooplankton) or excluding boundary effects -from model analysis.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zExtract_PPMR.html b/docs/reference/zExtract_PPMR.html deleted file mode 100644 index 8bb0da2..0000000 --- a/docs/reference/zExtract_PPMR.html +++ /dev/null @@ -1,101 +0,0 @@ - -Calculate predator-prey mass ratio data for visualization — extractPPMR • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Calculates predator-prey mass ratio (PPMR) values and biomass weightings -for creating PPMR distribution plots in ZooMSS analysis.

    -
    - -
    -
    extractPPMR(dat)
    -
    - -
    -

    Arguments

    - - -
    dat
    -

    ZooMSS results object containing abundances and model parameters

    - -
    -
    -

    Value

    -

    List containing PPMR density data and species-specific values for plotting

    -
    -
    -

    Details

    -

    Calculate PPMR Data for Plotting

    -

    This function computes theoretical and realized PPMR patterns by:

    • Calculating size-dependent PPMR values using Wirtz 2012 equations

    • -
    • Weighting by biomass to show community-level patterns

    • -
    • Computing species-specific PPMR values

    • -
    • Handling special cases for filter feeders (larvaceans, salps)

    • -

    This is a helper function primarily used by plotPPMR for visualization. -PPMR analysis provides insights into food web structure and predation patterns.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zGetGroups.html b/docs/reference/zGetGroups.html deleted file mode 100644 index c94e9df..0000000 --- a/docs/reference/zGetGroups.html +++ /dev/null @@ -1,131 +0,0 @@ - -Load default or custom functional groups for ZooMSS model — getGroups • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Provides access to the default ZooMSS functional groups or loads custom -groups from a file. This function is the primary way to obtain Groups data for -ZooMSS model runs.

    -
    - -
    -
    getGroups(source = c("default", "file", "template"), file = NULL)
    -
    - -
    -

    Arguments

    - - -
    source
    -

    Character string specifying data source. Options:

    • "default": Use built-in ZooMSS functional groups

    • -
    • "file": Load groups from a CSV file

    • -
    • "template": Export default groups to a file for modification

    • -
    - - -
    file
    -

    Path to CSV file when source="file" or source="template"

    - -
    -
    -

    Value

    -

    Data frame containing functional groups with required columns: -Species, Type, W0, Wmax, and other biological parameters

    -
    -
    -

    Details

    -

    Get Default ZooMSS Functional Groups

    -

    This function provides flexible access to functional groups data:

    • Default groups: Returns the standard ZooMSS functional groups (9 groups)

    • -
    • Custom file: Loads and validates groups from a user-provided CSV file

    • -
    • Template creation: Exports default groups to a file for user modification

    • -

    The default groups include: Flagellates, Ciliates, Larvaceans, OmniCopepods, -CarnCopepods, Euphausiids, Chaetognaths, Salps, and Jellyfish.

    -

    All groups data is validated to ensure it contains required columns and -reasonable parameter values for successful model runs.

    -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# Use default groups
    -Groups <- getGroups()
    -
    -# Create a template file for modification
    -getGroups(source = "template", file = "my_groups.csv")
    -
    -# Load custom groups from file
    -custom_groups <- getGroups(source = "file", file = "my_groups.csv")
    -
    -# Modify default groups programmatically
    -Groups <- getGroups()
    -Groups$W0[Groups$Species == "Flagellates"] <- -12.5  # Modify minimum size
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zLoadDefaultGroups.html b/docs/reference/zLoadDefaultGroups.html deleted file mode 100644 index bb656ab..0000000 --- a/docs/reference/zLoadDefaultGroups.html +++ /dev/null @@ -1,89 +0,0 @@ - -Internal function to load default ZooMSS groups — loadDefaultGroups • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Loads the default functional groups from the package data or CSV file. -This is an internal function used by getGroups().

    -
    - -
    -
    loadDefaultGroups()
    -
    - -
    -

    Value

    -

    Data frame with default functional groups

    -
    -
    -

    Details

    -

    Load Default Functional Groups Data

    -

    This function handles the actual loading of default groups data, -whether from package data (if available) or from the CSV file in data-raw.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zMakeDietTibble.html b/docs/reference/zMakeDietTibble.html deleted file mode 100644 index 1d2e2cb..0000000 --- a/docs/reference/zMakeDietTibble.html +++ /dev/null @@ -1,103 +0,0 @@ - -Convert diet matrix to long format for analysis and visualization — makeDietTibble • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Converts ZooMSS diet matrix from wide format to long (tidy) format -with predator-prey relationships clearly defined.

    -
    - -
    -
    makeDietTibble(mat, mdl)
    -
    - -
    -

    Arguments

    - - -
    mat
    -

    Diet matrix from ZooMSS output (predators x prey)

    - - -
    mdl
    -

    ZooMSS model object containing species names for labeling

    - -
    -
    -

    Value

    -

    Long tibble with columns: Predator, Prey, Diet

    -
    -
    -

    Details

    -

    Create Diet Matrix in Long Tibble Format

    -

    This function transforms diet matrices into a long format suitable for -analysis and visualization of feeding relationships. The resulting tibble -contains predator-prey pairs with diet fraction values, making it easy to -analyze trophic interactions and create food web visualizations.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zPlotEnvironment.html b/docs/reference/zPlotEnvironment.html deleted file mode 100644 index 6cd5858..0000000 --- a/docs/reference/zPlotEnvironment.html +++ /dev/null @@ -1,113 +0,0 @@ - -Plot environmental forcing data — plotEnvironment • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Creates plots of sea surface temperature and chlorophyll time series -for visualizing environmental forcing data used in ZooMSS model runs.

    -
    - -
    -
    plotEnvironment(env_data)
    -
    - -
    -

    Arguments

    - - -
    env_data
    -

    Environmental data frame with time, sst, chlo columns

    - -
    -
    -

    Value

    -

    ggplot object (if patchwork available) or list of two ggplot objects

    -
    -
    -

    Details

    -

    Plot Environmental Time Series

    -

    This function creates two separate plots with different y-axes scales:

    • SST plot (red line) with temperature in deg C

    • -
    • Chlorophyll plot (green line) with concentration in mg/m^3

    • -

    The plots can be combined using the patchwork package if available, otherwise -separate plots are returned as a list. This helps users visualize the -environmental forcing that drives ZooMSS model dynamics.

    -
    - -
    -

    Examples

    -
    # Create sample data and plot
    -env_data <- data.frame(
    -  time = 1:100,
    -  dt = 0.01,
    -  sst = 15 + 3*sin(2*pi*(1:100)/50),
    -  chlo = 0.5 + 0.2*cos(2*pi*(1:100)/50)
    -)
    -plots <- plotEnvironment(env_data)
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zPlot_AbundTimeSeries.html b/docs/reference/zPlot_AbundTimeSeries.html deleted file mode 100644 index d012c96..0000000 --- a/docs/reference/zPlot_AbundTimeSeries.html +++ /dev/null @@ -1,114 +0,0 @@ - -Visualize abundance changes over time for each functional group — zPlot_AbundTimeSeries • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Creates time series plots showing how total abundance of each functional -group changes throughout the ZooMSS simulation period.

    -
    - -
    -
    zPlot_AbundTimeSeries(dat)
    -
    - -
    -

    Arguments

    - - -
    dat
    -

    ZooMSS results object containing model outputs with time series data

    - -
    -
    -

    Value

    -

    ggplot object showing abundance time series by species

    -
    -
    -

    Details

    -

    Plot Abundance Time Series

    -

    This function creates time series visualization by:

    • Summing abundances across all size classes for each functional group

    • -
    • Converting to long format for ggplot visualization

    • -
    • Plotting log-transformed abundance over time

    • -
    • Using species-specific colors and filtering out zero abundances

    • -

    Time series plots help identify:

    • Equilibration time for model runs

    • -
    • Seasonal or cyclical patterns in abundance

    • -
    • Relative abundance patterns between functional groups

    • -
    • Model stability and convergence behavior

    • -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# After running ZooMSS model with SaveTimeSteps = TRUE
    -results <- zoomss_model(input_params, Groups, SaveTimeSteps = TRUE)
    -time_plot <- zPlot_AbundTimeSeries(results)
    -print(time_plot)
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zPlot_BiomassTimeSeries.html b/docs/reference/zPlot_BiomassTimeSeries.html deleted file mode 100644 index 7278328..0000000 --- a/docs/reference/zPlot_BiomassTimeSeries.html +++ /dev/null @@ -1,145 +0,0 @@ - -Visualize biomass changes over time with multiple display options — zPlot_BiomassTimeSeries • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Creates flexible time series plots showing how total biomass of functional -groups changes throughout the ZooMSS simulation, with options for line plots, -stacked area plots, and proportional displays.

    -
    - -
    -
    zPlot_BiomassTimeSeries(
    -  dat,
    -  stacked = FALSE,
    -  proportional = FALSE,
    -  species = NULL
    -)
    -
    - -
    -

    Arguments

    - - -
    dat
    -

    ZooMSS results object containing model outputs with time series data

    - - -
    stacked
    -

    Logical, whether to create stacked area plot instead of line plot (default: FALSE)

    - - -
    proportional
    -

    Logical, whether to show proportions instead of absolute values (default: FALSE)

    - - -
    species
    -

    Character vector of species names to include in plot. If NULL, all species included (default: NULL)

    - -
    -
    -

    Value

    -

    ggplot object showing biomass time series by species

    -
    -
    -

    Details

    -

    Plot Biomass Time Series

    -

    This function creates biomass time series visualization with multiple options:

    • Line plots: Individual species biomass trajectories over time

    • -
    • Stacked plots: Cumulative biomass showing total ecosystem biomass

    • -
    • Proportional plots: Relative biomass contributions (0-1 scale)

    • -
    • Species filtering: Focus on specific functional groups

    • -

    The function calculates biomass by multiplying abundance by body weights and -summing across size classes for each functional group. Different plot types help -visualize different aspects of ecosystem dynamics:

    • Line plots show individual group patterns and relative magnitudes

    • -
    • Stacked plots show total ecosystem biomass and contributions

    • -
    • Proportional plots highlight shifts in community composition

    • -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# After running ZooMSS model with SaveTimeSteps = TRUE
    -results <- zoomss_model(input_params, Groups, SaveTimeSteps = TRUE)
    -
    -# Basic line plot of all species
    -biomass_plot <- zPlot_BiomassTimeSeries(results)
    -
    -# Stacked area plot showing total biomass
    -stacked_plot <- zPlot_BiomassTimeSeries(results, stacked = TRUE)
    -
    -# Proportional plot showing relative contributions
    -prop_plot <- zPlot_BiomassTimeSeries(results, proportional = TRUE)
    -
    -# Focus on specific groups
    -copepod_plot <- zPlot_BiomassTimeSeries(results,
    -                                              species = c("OmniCopepods", "CarnCopepods"))
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zPlot_GrowthTimeSeries.html b/docs/reference/zPlot_GrowthTimeSeries.html deleted file mode 100644 index a4d7db3..0000000 --- a/docs/reference/zPlot_GrowthTimeSeries.html +++ /dev/null @@ -1,114 +0,0 @@ - -Visualize growth rate changes over time for each functional group — zPlot_GrowthTimeSeries • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Creates time series plots showing how average growth rates of each functional -group change throughout the ZooMSS simulation period.

    -
    - -
    -
    zPlot_GrowthTimeSeries(dat)
    -
    - -
    -

    Arguments

    - - -
    dat
    -

    ZooMSS results object containing model outputs with time series data

    - -
    -
    -

    Value

    -

    ggplot object showing growth rate time series by species

    -
    -
    -

    Details

    -

    Plot Growth Rate Time Series

    -

    This function creates growth rate time series by:

    • Averaging growth rates across all size classes for each functional group

    • -
    • Converting to long format for ggplot visualization

    • -
    • Plotting log-transformed growth rates over time

    • -
    • Using species-specific colors and filtering out zero values

    • -

    Growth rate time series help assess:

    • Environmental effects on organism growth

    • -
    • Seasonal patterns in productivity

    • -
    • Differences in growth potential between functional groups

    • -
    • Model response to changing environmental conditions

    • -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# After running ZooMSS model with SaveTimeSteps = TRUE
    -results <- zoomss_model(input_params, Groups, SaveTimeSteps = TRUE)
    -growth_plot <- zPlot_GrowthTimeSeries(results)
    -print(growth_plot)
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zPlot_PPMR.html b/docs/reference/zPlot_PPMR.html deleted file mode 100644 index 3b8dbcb..0000000 --- a/docs/reference/zPlot_PPMR.html +++ /dev/null @@ -1,113 +0,0 @@ - -Visualize predator-prey mass ratio patterns in ZooMSS results — plotPPMR • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Creates a plot showing the distribution of predator-prey mass ratios (PPMR) -across functional groups, providing insights into the trophic structure of the ecosystem.

    -
    - -
    -
    plotPPMR(dat)
    -
    - -
    -

    Arguments

    - - -
    dat
    -

    ZooMSS results object containing model outputs and parameters

    - -
    -
    -

    Value

    -

    ggplot object showing PPMR distribution with species-specific overlays

    -
    -
    -

    Details

    -

    Plot Predator-Prey Mass Ratio (PPMR) Distribution

    -

    This function calculates and visualizes PPMR patterns by:

    • Computing theoretical PPMR values for each functional group and size class

    • -
    • Weighting by biomass to show realized community patterns

    • -
    • Creating a density plot of PPMR distribution across the community

    • -
    • Overlaying species-specific PPMR values as points

    • -

    PPMR is a key ecological metric that describes the size relationship between -predators and their prey, providing insight into food web structure and -energy transfer efficiency in marine ecosystems.

    -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# After running ZooMSS model
    -results <- zoomss_model(input_params, Groups, SaveTimeSteps = FALSE)
    -ppmr_plot <- plotPPMR(results)
    -print(ppmr_plot)
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zPlot_PredTimeSeries.html b/docs/reference/zPlot_PredTimeSeries.html deleted file mode 100644 index 40650bc..0000000 --- a/docs/reference/zPlot_PredTimeSeries.html +++ /dev/null @@ -1,114 +0,0 @@ - -Visualize predation mortality changes over time for each functional group — zPlot_PredTimeSeries • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Creates time series plots showing how average predation mortality rates of each -functional group change throughout the ZooMSS simulation period.

    -
    - -
    -
    zPlot_PredTimeSeries(dat)
    -
    - -
    -

    Arguments

    - - -
    dat
    -

    ZooMSS results object containing model outputs with time series data

    - -
    -
    -

    Value

    -

    ggplot object showing predation mortality time series by species

    -
    -
    -

    Details

    -

    Plot Predation Mortality Time Series

    -

    This function creates predation mortality time series by:

    • Averaging predation mortality rates across all size classes for each functional group

    • -
    • Converting to long format for ggplot visualization

    • -
    • Plotting mortality rates over time without log transformation

    • -
    • Using species-specific colors and filtering out zero values

    • -

    Predation mortality time series help assess:

    • Predation pressure on different functional groups over time

    • -
    • Seasonal or temporal patterns in predation intensity

    • -
    • Relative vulnerability of functional groups to predation

    • -
    • Model dynamics and predator-prey interactions

    • -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# After running ZooMSS model with SaveTimeSteps = TRUE
    -results <- zoomss_model(input_params, Groups, SaveTimeSteps = TRUE)
    -mortality_plot <- zPlot_PredTimeSeries(results)
    -print(mortality_plot)
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zPlot_SizeSpectra.html b/docs/reference/zPlot_SizeSpectra.html deleted file mode 100644 index da2af2b..0000000 --- a/docs/reference/zPlot_SizeSpectra.html +++ /dev/null @@ -1,114 +0,0 @@ - -Visualize abundance size spectra across functional groups — plotSizeSpectra • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Creates a log-log plot of abundance versus body size for all functional groups, -showing the classic size spectrum pattern in marine ecosystems.

    -
    - -
    -
    plotSizeSpectra(dat)
    -
    - -
    -

    Arguments

    - - -
    dat
    -

    ZooMSS results object containing model outputs and parameters

    - -
    -
    -

    Value

    -

    ggplot object showing log abundance vs log body weight by species

    -
    -
    -

    Details

    -

    Plot Size Spectra for ZooMSS Results

    -

    This function visualizes the abundance size spectrum by:

    • Converting abundance data to long format with body weights

    • -
    • Filtering out zero abundances to focus on active size classes

    • -
    • Creating log-log plots colored by functional group

    • -
    • Using species-specific colors defined in the Groups parameter table

    • -

    Size spectra are fundamental patterns in marine ecology, typically showing -declining abundance with increasing body size. This visualization helps -assess model realism and identify dominant size classes within each -functional group.

    -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# After running ZooMSS model
    -results <- zoomss_model(input_params, Groups, SaveTimeSteps = FALSE)
    -size_plot <- plotSizeSpectra(results)
    -print(size_plot)
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zSizeBiomass.html b/docs/reference/zSizeBiomass.html deleted file mode 100644 index 2e475bd..0000000 --- a/docs/reference/zSizeBiomass.html +++ /dev/null @@ -1,102 +0,0 @@ - -Sum biomass across functional groups for each size class — zExtractBiomassSize • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Converts abundance to biomass and sums across all functional groups -to provide total biomass per size class per spatial cell.

    -
    - -
    -
    zExtractBiomassSize(res, w)
    -
    - -
    -

    Arguments

    - - -
    res
    -

    List of abundance matrices from ZooMSS output

    - - -
    w
    -

    Vector of body weights for each size class (grams)

    - -
    -
    -

    Value

    -

    List of vectors with total biomass per size class (grams wet weight)

    -
    -
    -

    Details

    -

    Calculate Size-Class Biomass

    -

    This function provides size-class-level biomass by summing across -functional groups. Useful for analyzing community size structure and -comparing size spectrum patterns between locations.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zSpeciesBiomass.html b/docs/reference/zSpeciesBiomass.html deleted file mode 100644 index 8182358..0000000 --- a/docs/reference/zSpeciesBiomass.html +++ /dev/null @@ -1,102 +0,0 @@ - -Sum biomass across size classes for each functional group — zExtractBiomassSpecies • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Converts abundance to biomass and sums across all size classes -to provide total biomass per functional group per spatial cell.

    -
    - -
    -
    zExtractBiomassSpecies(res, vmdl)
    -
    - -
    -

    Arguments

    - - -
    res
    -

    List of abundance matrices from ZooMSS output

    - - -
    vmdl
    -

    ZooMSS model object containing weight vector (param$w)

    - -
    -
    -

    Value

    -

    List of vectors with total biomass per functional group (grams wet weight)

    -
    -
    -

    Details

    -

    Calculate Species-Level Biomass

    -

    This function combines abundance-to-biomass conversion with size-class -aggregation in one step, providing species-level biomass summaries useful -for spatial analyses and ecological comparisons.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zSpeciesCarbonBiomass.html b/docs/reference/zSpeciesCarbonBiomass.html deleted file mode 100644 index efbeefd..0000000 --- a/docs/reference/zSpeciesCarbonBiomass.html +++ /dev/null @@ -1,104 +0,0 @@ - -Convert abundances to carbon biomass and sum across size classes — zSpeciesCarbonBiomass • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Converts abundance data to carbon biomass and then sums across all -size classes to provide total carbon biomass per functional group.

    -
    - -
    -
    zSpeciesCarbonBiomass(res, vmdl)
    -
    - -
    -

    Arguments

    - - -
    res
    -

    List of abundance matrices from ZooMSS output

    - - -
    vmdl
    -

    ZooMSS model object containing weight vector and carbon content factors

    - -
    -
    -

    Value

    -

    List of vectors with total carbon biomass per functional group (grams carbon)

    -
    -
    -

    Details

    -

    Convert Abundance to Species-Level Carbon Biomass

    -

    This function combines carbon biomass conversion with size-class aggregation:

    1. Converts abundance to wet weight biomass

    2. -
    3. Converts to carbon biomass using group-specific factors

    4. -
    5. Sums across all size classes for each functional group

    6. -

    Provides species-level carbon biomass useful for ecological stoichiometry -and biogeochemical cycle analyses.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zSumAll.html b/docs/reference/zSumAll.html deleted file mode 100644 index d4c6773..0000000 --- a/docs/reference/zSumAll.html +++ /dev/null @@ -1,98 +0,0 @@ - -Sum abundances across all groups and size classes — reduceAll • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Calculates total abundance across all functional groups and size classes, -providing a single abundance value per spatial cell.

    -
    - -
    -
    reduceAll(list_in)
    -
    - -
    -

    Arguments

    - - -
    list_in
    -

    List of abundance matrices (typically from multiple spatial cells)

    - -
    -
    -

    Value

    -

    Vector of total abundance values (one per spatial cell)

    -
    -
    -

    Details

    -

    Sum All ZooMSS Output

    -

    This function provides the most aggregated view of ZooMSS output by -summing across both functional groups and size classes. Useful for comparing -total community abundance between locations or time periods.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zSumSize.html b/docs/reference/zSumSize.html deleted file mode 100644 index 06bf48c..0000000 --- a/docs/reference/zSumSize.html +++ /dev/null @@ -1,120 +0,0 @@ - -Collection of helper functions for analyzing ZooMSS model outputs — reduceSize • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    This file contains utility functions for processing, analyzing, and -transforming ZooMSS model outputs for visualization and interpretation.

    -

    Sums abundance values across all size classes for each functional group, -providing total abundance per group.

    -
    - -
    -
    reduceSize(list_in)
    -
    - -
    -

    Arguments

    - - -
    list_in
    -

    List of abundance matrices (typically from multiple spatial cells)

    - -
    -
    -

    Value

    -

    List of vectors with total abundance per functional group

    -
    -
    -

    Details

    -

    ZooMSS Utility Functions for Analysis and Post-Processing

    -

    The utility functions in this file provide tools for:

    • Converting between abundance and biomass

    • -
    • Aggregating results across size classes or functional groups

    • -
    • Calculating ecological metrics (trophic levels, PPMR)

    • -
    • Processing environmental data for model input

    • -
    • Data format conversions for analysis workflows

    • -

    These functions are essential for the ZooMSS analysis pipeline and help users -work with model outputs in different formats depending on their research needs. -Sum ZooMSS Output Across Size Bins

    -

    This function collapses the size dimension of ZooMSS output by summing -across all size classes. Useful for analyzing total abundance patterns without -size structure detail.

    -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# After running ZooMSS model
    -results <- zoomss_model(input_params, Groups, SaveTimeSteps = FALSE)
    -total_abundances <- reduceSize(results$abundances)
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zSumSpecies.html b/docs/reference/zSumSpecies.html deleted file mode 100644 index 3396679..0000000 --- a/docs/reference/zSumSpecies.html +++ /dev/null @@ -1,98 +0,0 @@ - -Aggregate ZooMSS abundances across all functional groups — reduceSpecies • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Sums abundance values across all functional groups for each size class, -providing total abundance per size class.

    -
    - -
    -
    reduceSpecies(list_in)
    -
    - -
    -

    Arguments

    - - -
    list_in
    -

    List of abundance matrices (typically from multiple spatial cells)

    - -
    -
    -

    Value

    -

    List of vectors with total abundance per size class

    -
    -
    -

    Details

    -

    Sum ZooMSS Output Across Functional Groups

    -

    This function collapses the functional group dimension by summing across -all groups for each size class. Useful for analyzing community size spectrum -patterns without functional group detail.

    -
    - -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zTrophicLevel.html b/docs/reference/zTrophicLevel.html deleted file mode 100644 index 3ace135..0000000 --- a/docs/reference/zTrophicLevel.html +++ /dev/null @@ -1,118 +0,0 @@ - -Compute trophic levels for functional groups using diet composition — extractTrophicLevels • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Calculates trophic levels for each functional group based on their -diet composition using an iterative Gauss-Seidel algorithm.

    -
    - -
    -
    extractTrophicLevels(diet_matrix)
    -
    - -
    -

    Arguments

    - - -
    diet_matrix
    -

    12x15 matrix where rows are predators (functional groups) and -columns are prey (first 3 columns are phytoplankton size classes, remaining 12 are -zooplankton/fish groups). Values represent diet fractions.

    - -
    -
    -

    Value

    -

    Vector of trophic levels for each functional group (length 12)

    -
    -
    -

    Details

    -

    Calculate Trophic Levels from Diet Matrix

    -

    This function computes trophic levels by:

    • Starting with phytoplankton at trophic level 1.0

    • -
    • Initializing all other groups at trophic level 2.0

    • -
    • Iteratively updating trophic levels based on weighted diet composition

    • -
    • Continuing until convergence (difference < 0.01) or maximum iterations (100)

    • -

    Trophic level calculation follows: TL = 1 + sum(diet_fraction_i * TL_prey_i)

    -

    This provides a quantitative measure of each group's position in the food web -and is useful for analyzing ecosystem structure and energy transfer efficiency.

    -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# After running ZooMSS model
    -results <- zoomss_model(input_params, Groups, SaveTimeSteps = FALSE)
    -trophic_levels <- extractTrophicLevels(results$diets)
    -
    -# View trophic levels by group
    -names(trophic_levels) <- results$model$param$Groups$Species
    -print(trophic_levels)
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zValidateGroups.html b/docs/reference/zValidateGroups.html deleted file mode 100644 index 15844ae..0000000 --- a/docs/reference/zValidateGroups.html +++ /dev/null @@ -1,114 +0,0 @@ - -Validate ZooMSS functional groups data structure and values — validateGroups • zoomss - - -
    -
    - - - -
    -
    - - -
    -

    Performs comprehensive validation of functional groups data to ensure -it meets ZooMSS model requirements.

    -
    - -
    -
    validateGroups(groups)
    -
    - -
    -

    Arguments

    - - -
    groups
    -

    Data frame containing functional groups data

    - -
    -
    -

    Value

    -

    TRUE if validation passes (invisibly), otherwise throws an error

    -
    -
    -

    Details

    -

    Validate Functional Groups Data

    -

    This function validates:

    • Required column names are present

    • -
    • Data types are correct

    • -
    • Parameter values are within reasonable ranges

    • -
    • No missing values in critical columns

    • -
    • Size ranges are logical (W0 < Wmax)

    • -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -Groups <- getGroups()
    -validateGroups(Groups)  # Should pass
    -
    -# This would fail validation:
    -bad_groups <- Groups
    -bad_groups$W0 <- NULL
    -validateGroups(bad_groups)  # Error: missing required column
    -} # }
    -
    -
    -
    -
    - -
    - - -
    - -
    -

    Site built with pkgdown 2.1.3.

    -
    - -
    - - - - - - - - diff --git a/docs/reference/zoomss_model.html b/docs/reference/zoomss_model.html deleted file mode 100644 index 039a9e3..0000000 --- a/docs/reference/zoomss_model.html +++ /dev/null @@ -1,132 +0,0 @@ - -Main ZooMSS model function for complete simulations — zoomss_model • zoomss - Skip to contents - - -
    -
    -
    - -
    -

    This is the main wrapper function that orchestrates a complete ZooMSS -model simulation from parameter setup through model execution to output processing.

    -
    - -
    -

    Usage

    -
    zoomss_model(input_params, Groups = NULL, isave = 1)
    -
    - -
    -

    Arguments

    - - -
    input_params
    -

    Data frame containing model parameters and environmental time series. -Must include columns: time (time vector in years), sst (sea surface temperature), -and chl (chlorophyll). Can optionally include cellID for spatial data. The time step (dt) -and maximum time (tmax) are automatically calculated from the time vector. Can be created using createInputParams().

    - - -
    Groups
    -

    Data frame defining functional groups with their biological parameters. -Must include columns defining species characteristics, size ranges, and feeding parameters. -If NULL, uses default ZooMSS functional groups. Can be obtained/customized using -getGroups().

    - - -
    isave
    -

    Save frequency in time steps (default: 10)

    - -
    -
    -

    Value

    -

    Complete ZooMSS model results object containing:

    • param: Model parameters and environmental forcing data

    • -
    • N: Abundance time series (time x groups x size classes)

    • -
    • gg: Growth rate time series

    • -
    • Z: Mortality rate time series

    • -
    • diet: Diet composition time series

    • -
    • time: Time values corresponding to saved results (accounting for isave)

    • -
    • Additional model structure and kernel data

    • -
    -
    -

    Details

    -

    Run Complete ZooMSS Model Simulation

    -

    This function coordinates the entire ZooMSS modeling workflow:

    1. Validates that environmental time series data is provided

    2. -
    3. Sets up model parameters using the Groups data and input parameters

    4. -
    5. Initializes the model structure and feeding kernels

    6. -
    7. Runs the model forward in time with dynamic environmental forcing

    8. -
    9. Processes outputs by averaging the final 50% of the simulation

    10. -
    11. Returns organized results including abundances, diets, growth, and mortality

    12. -

    This is the primary entry point for -running ZooMSS simulations with environmental forcing.

    -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# Basic usage with default groups
    -env_data <- createEnviroData(10, 0.01)
    -input_params <- createInputParams(env_data$time, env_data$sst, env_data$chl)
    -results <- zoomss_model(input_params, isave = 50)
    -
    -# Using custom groups
    -Groups <- getGroups()  # Get default groups
    -Groups$W0[1] <- -12.5          # Modify a parameter
    -results <- zoomss_model(input_params, Groups, isave = 100)
    -
    -# Loading groups from file
    -custom_groups <- getGroups(source = "file", file = "my_groups.csv")
    -results <- zoomss_model(input_params, custom_groups)
    -} # }
    -
    -
    -
    -
    - - -
    - - - -
    - - - - - - - diff --git a/docs/reference/zoomss_mvf.html b/docs/reference/zoomss_mvf.html deleted file mode 100644 index aa0da93..0000000 --- a/docs/reference/zoomss_mvf.html +++ /dev/null @@ -1,175 +0,0 @@ - -Solve McKendrick-von Foerster equation for size-structured populations — zoomss_mvf • zoomss - Skip to contents - - -
    -
    -
    - -
    -

    Solves the McKendrick-von Foerster (MvF) partial differential equation -for size-structured population dynamics using a finite difference approach in base R.

    -
    - -
    -

    Usage

    -
    zoomss_mvf(
    -  ngrps,
    -  curr_min_size,
    -  curr_max_size,
    -  A_iter,
    -  C_iter,
    -  Nb_iter,
    -  S_iter,
    -  A,
    -  B,
    -  C,
    -  Nb,
    -  S
    -)
    -
    - -
    -

    Arguments

    - - -
    ngrps
    -

    Number of functional groups in the model

    - - -
    curr_min_size
    -

    Vector of minimum size class indices for each group

    - - -
    curr_max_size
    -

    Vector of maximum size class indices for each group

    - - -
    A_iter
    -

    Matrix of advection coefficients for current iteration

    - - -
    C_iter
    -

    Matrix of diagonal coefficients for current iteration

    - - -
    Nb_iter
    -

    Matrix to store updated abundances for current iteration

    - - -
    S_iter
    -

    Matrix of source terms for current iteration

    - - -
    A
    -

    Matrix of advection coefficients

    - - -
    B
    -

    Matrix of diffusion coefficients

    - - -
    C
    -

    Matrix of diagonal coefficients

    - - -
    Nb
    -

    Matrix of abundances to be updated

    - - -
    S
    -

    Matrix of source terms

    - -
    -
    -

    Value

    -

    Updated abundance matrix (Nb) with new size-class distributions

    -
    -
    -

    Details

    -

    McKendrick-von Foerster Equation Solver (Base R Implementation)

    -

    This function implements the numerical solution to the McKendrick-von Foerster -equation, which describes how populations change across size classes over time. -The equation is solved using an upwind finite difference scheme that handles:

    • Growth through size classes (advection term)

    • -
    • Diffusion between adjacent size classes

    • -
    • Source and sink terms from feeding and mortality

    • -

    The function processes each functional group separately and applies boundary conditions -appropriate for size-structured models. The last size class is set to zero abundance -to represent maximum size limits.

    -

    This is a core computational component of ZooMSS that updates population abundances -at each time step based on growth, mortality, and reproduction processes.

    -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# This function is typically called internally by zoomss_run
    -# Example shows the structure of parameters needed:
    -ngrps <- 9
    -ngrid <- 100
    -curr_min_size <- c(1, 10, 20, 30, 40, 50, 60, 70, 80)
    -curr_max_size <- c(30, 40, 50, 60, 70, 80, 90, 95, 100)
    -
    -# Initialize coefficient matrices
    -A <- matrix(0, nrow = ngrps, ncol = ngrid)
    -B <- matrix(0, nrow = ngrps, ncol = ngrid) 
    -C <- matrix(1, nrow = ngrps, ncol = ngrid)
    -S <- matrix(0, nrow = ngrps, ncol = ngrid)
    -Nb <- matrix(0.1, nrow = ngrps, ncol = ngrid)
    -
    -# Run MvF solver
    -updated_abundances <- zoomss_mvf(ngrps, curr_min_size, curr_max_size,
    -                                       A, C, Nb, S, A, B, C, Nb, S)
    -} # }
    -
    -
    -
    -
    - - -
    - - - -
    - - - - - - - diff --git a/docs/reference/zoomss_params.html b/docs/reference/zoomss_params.html deleted file mode 100644 index b8123bb..0000000 --- a/docs/reference/zoomss_params.html +++ /dev/null @@ -1,130 +0,0 @@ - -Initialize and validate ZooMSS model parameters — zoomss_params • zoomss - Skip to contents - - -
    -
    -
    - -
    -

    Sets up the complete parameter list for ZooMSS model runs, including -functional group parameters, model dimensions, and environmental forcing data.

    -
    - -
    -

    Usage

    -
    zoomss_params(Groups, input_params, isave)
    -
    - -
    -

    Arguments

    - - -
    Groups
    -

    Data frame containing functional group definitions with columns: -Species, Type, W0 (log min size), Wmax (log max size), and various biological parameters

    - - -
    input_params
    -

    Data frame with model parameters including: -time (time vector in years), sst (sea surface temperature), and chl (chlorophyll). -The time vector can start at any value and the model automatically calculates dt (time step) and tmax (maximum time).

    - - -
    isave
    -

    Save frequency in time steps (default: 50)

    - -
    -
    -

    Value

    -

    List containing comprehensive model parameters:

    • Groups: Functional group definitions

    • -
    • ngrps: Number of functional groups

    • -
    • ngrid: Number of size classes

    • -
    • w: Size class weights (g)

    • -
    • tmax, dt, isave: Temporal parameters

    • -
    • zoo_grps, fish_grps: Indices for different organism types

    • -
    • phyto_int_ts, phyto_slope_ts: Time series of phytoplankton parameters

    • -
    • temp_eff_zoo_ts, temp_eff_fish_ts: Time series of temperature effects

    • -
    • Additional biological and physical parameters

    • -
    -
    -

    Details

    -

    Set Up ZooMSS Model Parameters

    -

    This function creates a comprehensive parameter object that contains:

    -

    Static Parameters (fixed across time steps):

    • Model dimensions (number of groups, size classes, time steps)

    • -
    • Biological parameters (growth efficiency, mortality rates)

    • -
    • Size class definitions and ranges for each functional group

    • -
    • Phytoplankton size spectrum parameters

    • -

    Dynamic Parameters (calculated from environmental data):

    • Phytoplankton abundance time series based on chlorophyll

    • -
    • Temperature effects on metabolism for zooplankton and fish

    • -
    • Environmental forcing validation and interpolation

    • -

    The function validates that environmental time series data covers the full -simulation period and pre-calculates time-varying parameters to optimize -model performance during the main simulation loop.

    -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# Load functional groups
    -data(Groups)
    -
    -# Create environmental time series
    -env_data <- createEnviroData(10, 0.01)
    -input_params <- createInputParams(env_data$time, env_data$sst, env_data$chl)
    -
    -# Generate parameter list
    -params <- zoomss_params(Groups, input_params, isave = 50)
    -} # }
    -
    -
    -
    -
    - - -
    - - - -
    - - - - - - - diff --git a/docs/reference/zoomss_run.html b/docs/reference/zoomss_run.html deleted file mode 100644 index dac1963..0000000 --- a/docs/reference/zoomss_run.html +++ /dev/null @@ -1,123 +0,0 @@ - -Execute the main ZooMSS simulation loop with dynamic environmental forcing — zoomss_run • zoomss - Skip to contents - - -
    -
    -
    - -
    -

    Runs the ZooMSS model forward in time, updating environmental conditions -and population dynamics at each time step using the McKendrick-von Foerster framework.

    -
    - -
    -

    Usage

    -
    zoomss_run(model)
    -
    - -
    -

    Arguments

    - - -
    model
    -

    Model object created by zoomss_setup containing:

    • param: Complete parameter list with environmental time series

    • -
    • Feeding kernels and biological rate parameters

    • -
    • Initial conditions and model structure

    • -
    - -
    -
    -

    Value

    -

    List containing complete model output:

    • param: Model parameters used in simulation

    • -
    • N: Abundance time series (time x groups x size classes)

    • -
    • gg: Growth rate time series

    • -
    • diet: Diet composition time series

    • -
    • Z: Mortality rate time series

    • -
    • time: Time values corresponding to saved results (accounting for isave)

    • -
    • w: Size class weights (g)

    • -
    • Additional time series data and model results

    • -
    -
    -

    Details

    -

    Run ZooMSS Model Forward in Time

    -

    This is the core simulation engine of ZooMSS that:

    -

    Environmental Dynamics:

    • Updates phytoplankton abundance spectrum based on chlorophyll time series

    • -
    • Applies temperature effects on zooplankton and fish metabolism

    • -
    • Recalculates feeding kernels with current environmental conditions

    • -

    Population Dynamics:

    • Solves McKendrick-von Foerster equation for size-structured growth

    • -
    • Updates feeding interactions between all size classes and groups

    • -
    • Calculates mortality from predation, senescence, and fishing

    • -
    • Handles recruitment and boundary conditions for each functional group

    • -

    Time Integration:

    • Processes model through all time steps with adaptive environmental forcing

    • -
    • Saves output at specified intervals for memory efficiency

    • -
    • Maintains mass balance and numerical stability throughout simulation

    • -

    Unlike static models, this version dynamically updates phytoplankton spectra -and temperature effects at each time step based on provided environmental data.

    -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# Set up model parameters and structure
    -params <- zoomss_params(Groups, input_params)
    -model <- zoomss_setup(params)
    -
    -# Run the simulation
    -results <- zoomss_run(model)
    -
    -# Access final abundances
    -final_abundances <- results$N[dim(results$N)[1],,]
    -} # }
    -
    -
    -
    -
    - - -
    - - - -
    - - - - - - - diff --git a/docs/reference/zoomss_setup.html b/docs/reference/zoomss_setup.html deleted file mode 100644 index f80ad2a..0000000 --- a/docs/reference/zoomss_setup.html +++ /dev/null @@ -1,126 +0,0 @@ - -Initialize ZooMSS model components and calculate feeding interactions — zoomss_setup • zoomss - Skip to contents - - -
    -
    -
    - -
    -

    Sets up the ZooMSS model structure by calculating feeding kernels, mortality -rates, and other model components that remain static during the simulation.

    -
    - -
    -

    Usage

    -
    zoomss_setup(param)
    -
    - -
    -

    Arguments

    - - -
    param
    -

    Complete parameter list created by zoomss_params containing:

    • Groups: Functional group definitions and biological parameters

    • -
    • Model dimensions (ngrps, ngrid, time parameters)

    • -
    • Environmental forcing time series

    • -
    • Physical and biological constants

    • -
    - -
    -
    -

    Value

    -

    Model object containing:

    • param: Input parameters (passed through)

    • -
    • dynam_xxx: Dynamic feeding kernel arrays for group interactions (where xxx = growthkernel, diffkernel, dietkernel, mortkernel)

    • -
    • phyto_xxx: Phytoplankton feeding kernel arrays (where xxx = growthkernel, diffkernel, dietkernel)

    • -
    • nPP: Initial phytoplankton abundance spectrum

    • -
    • M_sb_base: Baseline senescence mortality rates

    • -
    • fish_mort: Fishing mortality rates

    • -
    • assim_eff: Assimilation efficiency matrix

    • -
    • temp_eff: Temperature effect matrix (initialized)

    • -
    • N: Initial abundance arrays

    • -
    • time: Time array for storing time values (initialized as NA)

    • -
    • Additional model structure components

    • -
    -
    -

    Details

    -

    Setup ZooMSS Model Structure and Feeding Kernels

    -

    This function initializes the core ZooMSS model structure by calculating:

    -

    Static Components (calculated once):

    • Feeding preference kernels based on predator-prey size ratios

    • -
    • Search volumes and encounter rates between size classes

    • -
    • Baseline mortality rates (senescence, fishing)

    • -
    • Initial abundance distributions for all functional groups

    • -

    Dynamic Component Structures (updated during run):

    • Phytoplankton feeding kernels (structure calculated here, values updated with environment)

    • -
    • Growth and diffusion kernels for zooplankton and fish interactions

    • -
    • Diet and mortality tracking arrays

    • -

    Model Architecture:

    • Size-structured populations across logarithmic size classes

    • -
    • Multiple functional groups with different feeding behaviors

    • -
    • Environmental coupling through phytoplankton and temperature

    • -

    The function separates static calculations (done once for efficiency) from -dynamic calculations (updated each time step in zoomss_run).

    -
    - -
    -

    Examples

    -
    if (FALSE) { # \dontrun{
    -# Create parameters for model setup
    -params <- zoomss_params(Groups, input_params)
    -
    -# Initialize model structure
    -model <- zoomss_setup(params)
    -
    -# Model is now ready for time integration with zoomss_run
    -results <- zoomss_run(model)
    -} # }
    -
    -
    -
    -
    - - -
    - - - -
    - - - - - - - diff --git a/docs/sitemap.xml b/docs/sitemap.xml deleted file mode 100644 index db9d6ab..0000000 --- a/docs/sitemap.xml +++ /dev/null @@ -1,70 +0,0 @@ - -https://MathMarEcol.github.io/zoomss/404.html -https://MathMarEcol.github.io/zoomss/LICENSE-text.html -https://MathMarEcol.github.io/zoomss/LICENSE.html -https://MathMarEcol.github.io/zoomss/articles/index.html -https://MathMarEcol.github.io/zoomss/articles/zoomss.html -https://MathMarEcol.github.io/zoomss/authors.html -https://MathMarEcol.github.io/zoomss/index.html -https://MathMarEcol.github.io/zoomss/reference/GroupInputs.html -https://MathMarEcol.github.io/zoomss/reference/averageTimeSeries.html -https://MathMarEcol.github.io/zoomss/reference/calculatePhytoParam.html -https://MathMarEcol.github.io/zoomss/reference/createEnviroData.html -https://MathMarEcol.github.io/zoomss/reference/createInputParams.html -https://MathMarEcol.github.io/zoomss/reference/extractPPMR.html -https://MathMarEcol.github.io/zoomss/reference/extractSizeRange.html -https://MathMarEcol.github.io/zoomss/reference/extractTrophicLevels.html -https://MathMarEcol.github.io/zoomss/reference/getBiomass.html -https://MathMarEcol.github.io/zoomss/reference/getGroups.html -https://MathMarEcol.github.io/zoomss/reference/index.html -https://MathMarEcol.github.io/zoomss/reference/loadDefaultGroups.html -https://MathMarEcol.github.io/zoomss/reference/pipe.html -https://MathMarEcol.github.io/zoomss/reference/plotEnvironment.html -https://MathMarEcol.github.io/zoomss/reference/plotPPMR.html -https://MathMarEcol.github.io/zoomss/reference/plotSizeSpectra.html -https://MathMarEcol.github.io/zoomss/reference/plotTimeSeries.html -https://MathMarEcol.github.io/zoomss/reference/reduceAll.html -https://MathMarEcol.github.io/zoomss/reference/reduceSize.html -https://MathMarEcol.github.io/zoomss/reference/reduceSpecies.html -https://MathMarEcol.github.io/zoomss/reference/untibble.html -https://MathMarEcol.github.io/zoomss/reference/validateGroups.html -https://MathMarEcol.github.io/zoomss/reference/zAveOutput.html -https://MathMarEcol.github.io/zoomss/reference/zBiomass.html -https://MathMarEcol.github.io/zoomss/reference/zCalculatePhytoParam.html -https://MathMarEcol.github.io/zoomss/reference/zCarbonBiomass.html -https://MathMarEcol.github.io/zoomss/reference/zConvert2Tibble.html -https://MathMarEcol.github.io/zoomss/reference/zCreateInputs.html -https://MathMarEcol.github.io/zoomss/reference/zCreateSimpleTimeSeries.html -https://MathMarEcol.github.io/zoomss/reference/zExtractAllSum.html -https://MathMarEcol.github.io/zoomss/reference/zExtractBiomassSize.html -https://MathMarEcol.github.io/zoomss/reference/zExtractBiomassSpecies.html -https://MathMarEcol.github.io/zoomss/reference/zExtractSizeRange.html -https://MathMarEcol.github.io/zoomss/reference/zExtractSizeSum.html -https://MathMarEcol.github.io/zoomss/reference/zExtractSpeciesSum.html -https://MathMarEcol.github.io/zoomss/reference/zExtractTrophicLevels.html -https://MathMarEcol.github.io/zoomss/reference/zExtract_PPMR.html -https://MathMarEcol.github.io/zoomss/reference/zGetGroups.html -https://MathMarEcol.github.io/zoomss/reference/zLoadDefaultGroups.html -https://MathMarEcol.github.io/zoomss/reference/zMakeDietTibble.html -https://MathMarEcol.github.io/zoomss/reference/zPlotEnvironment.html -https://MathMarEcol.github.io/zoomss/reference/zPlot_AbundTimeSeries.html -https://MathMarEcol.github.io/zoomss/reference/zPlot_BiomassTimeSeries.html -https://MathMarEcol.github.io/zoomss/reference/zPlot_GrowthTimeSeries.html -https://MathMarEcol.github.io/zoomss/reference/zPlot_PPMR.html -https://MathMarEcol.github.io/zoomss/reference/zPlot_PredTimeSeries.html -https://MathMarEcol.github.io/zoomss/reference/zPlot_SizeSpectra.html -https://MathMarEcol.github.io/zoomss/reference/zSizeBiomass.html -https://MathMarEcol.github.io/zoomss/reference/zSpeciesBiomass.html -https://MathMarEcol.github.io/zoomss/reference/zSpeciesCarbonBiomass.html -https://MathMarEcol.github.io/zoomss/reference/zSumAll.html -https://MathMarEcol.github.io/zoomss/reference/zSumSize.html -https://MathMarEcol.github.io/zoomss/reference/zSumSpecies.html -https://MathMarEcol.github.io/zoomss/reference/zTrophicLevel.html -https://MathMarEcol.github.io/zoomss/reference/zValidateGroups.html -https://MathMarEcol.github.io/zoomss/reference/zoomss_model.html -https://MathMarEcol.github.io/zoomss/reference/zoomss_mvf.html -https://MathMarEcol.github.io/zoomss/reference/zoomss_params.html -https://MathMarEcol.github.io/zoomss/reference/zoomss_run.html -https://MathMarEcol.github.io/zoomss/reference/zoomss_setup.html - -