Something went wrong on our end
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
io.html 28.83 KiB
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Input and Output · Persefone.jl</title><meta name="title" content="Input and Output · Persefone.jl"/><meta property="og:title" content="Input and Output · Persefone.jl"/><meta property="twitter:title" content="Input and Output · Persefone.jl"/><meta name="description" content="Documentation for Persefone.jl."/><meta property="og:description" content="Documentation for Persefone.jl."/><meta property="twitter:description" content="Documentation for Persefone.jl."/><script data-outdated-warner src="assets/warner.js"></script><link href="https://cdnjs.cloudflare.com/ajax/libs/lato-font/3.0.0/css/lato-font.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/juliamono/0.050/juliamono.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/fontawesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/solid.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/brands.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.8/katex.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" data-main="assets/documenter.js"></script><script src="search_index.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-dark.css" data-theme-name="documenter-dark" data-theme-primary-dark/><link class="docs-theme-link" rel="stylesheet" type="text/css" href="assets/themes/documenter-light.css" data-theme-name="documenter-light" data-theme-primary/><script src="assets/themeswap.js"></script></head><body><div id="documenter"><nav class="docs-sidebar"><a class="docs-logo" href="index.html"><img src="assets/logo.png" alt="Persefone.jl logo"/></a><div class="docs-package-name"><span class="docs-autofit"><a href="index.html">Persefone.jl</a></span></div><button class="docs-search-query input is-rounded is-small is-clickable my-2 mx-auto py-1 px-2" id="documenter-search-query">Search docs (Ctrl + /)</button><ul class="docs-menu"><li><a class="tocitem" href="index.html">Introduction</a></li><li><span class="tocitem">User guide</span><ul><li><a class="tocitem" href="using.html">The Persefone.jl Package</a></li><li><a class="tocitem" href="gui.html">Graphical User Interface</a></li><li><a class="tocitem" href="config.html">Configuration</a></li></ul></li><li><span class="tocitem">Developer guide</span><ul><li><a class="tocitem" href="developing.html">Developing Persefone</a></li><li><a class="tocitem" href="adapting.html">Adapting Persefone</a></li><li><a class="tocitem" href="architecture.html">Source code architecture</a></li><li><a class="tocitem" href="gis.html">Maps and weather data</a></li><li><a class="tocitem" href="species-dsl.html">Defining new species</a></li></ul></li><li><span class="tocitem">Core</span><ul><li><a class="tocitem" href="simulation.html">Simulation</a></li><li class="is-active"><a class="tocitem" href="io.html">Input and Output</a><ul class="internal"><li><a class="tocitem" href="#input.jl"><span>input.jl</span></a></li><li><a class="tocitem" href="#output.jl"><span>output.jl</span></a></li><li><a class="tocitem" href="#makieplots.jl"><span>makieplots.jl</span></a></li></ul></li></ul></li><li><span class="tocitem">Nature</span><ul><li><a class="tocitem" href="nature.html">Nature</a></li><li><a class="tocitem" href="energy.html">Dynamic Energy Budgets</a></li><li><a class="tocitem" href="species.html">Species</a></li></ul></li><li><a class="tocitem" href="crops.html">Crop submodel</a></li><li><a class="tocitem" href="farm.html">Farm submodel</a></li></ul><div class="docs-version-selector field has-addons"><div class="control"><span class="docs-label button is-static is-size-7">Version</span></div><div class="docs-selector control is-expanded"><div class="select is-fullwidth is-size-7"><select id="documenter-version-selector"></select></div></div></div></nav><div class="docs-main"><header class="docs-navbar"><a class="docs-sidebar-button docs-navbar-link fa-solid fa-bars is-hidden-desktop" id="documenter-sidebar-button" href="#"></a><nav class="breadcrumb"><ul class="is-hidden-mobile"><li><a class="is-disabled">Core</a></li><li class="is-active"><a href="io.html">Input and Output</a></li></ul><ul class="is-hidden-tablet"><li class="is-active"><a href="io.html">Input and Output</a></li></ul></nav><div class="docs-right"><a class="docs-navbar-link" href="https://git.idiv.de/persefone/persefone-model" title="View the repository"><span class="docs-icon fa-brands"></span><span class="docs-label is-hidden-touch">Repository</span></a><a class="docs-navbar-link" href="https://git.idiv.de/persefone/persefone-model/-/tree/master/docs/src/io.md" title="Edit source"><span class="docs-icon fa-solid"></span></a><a class="docs-settings-button docs-navbar-link fa-solid fa-gear" id="documenter-settings-button" href="#" title="Settings"></a><a class="docs-article-toggle-button fa-solid fa-chevron-up" id="documenter-article-toggle-button" href="javascript:;" title="Collapse all docstrings"></a></div></header><article class="content" id="documenter-page"><h1 id="Input-and-Output"><a class="docs-heading-anchor" href="#Input-and-Output">Input and Output</a><a id="Input-and-Output-1"></a><a class="docs-heading-anchor-permalink" href="#Input-and-Output" title="Permalink"></a></h1><p>These functions are responsible for reading in all model configurations (passed by config file or commandline), administrating them during a run, and printing or plotting any output.</p><h2 id="input.jl"><a class="docs-heading-anchor" href="#input.jl">input.jl</a><a id="input.jl-1"></a><a class="docs-heading-anchor-permalink" href="#input.jl" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.PARAMFILE" href="#Persefone.PARAMFILE"><code>Persefone.PARAMFILE</code></a> — <span class="docstring-category">Constant</span></header><section><div><p>The file that stores all default parameters: <code>src/parameters.toml</code></p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/input.jl#L10-L12">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.flattenTOML-Tuple{Any}" href="#Persefone.flattenTOML-Tuple{Any}"><code>Persefone.flattenTOML</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">flattenTOML(dict)</code></pre><p>An internal utility function to convert the two-dimensional dict returned by <code>TOML.parsefile()</code> into a one-dimensional dict, so that instead of writing <code>settings["domain"]["param"]</code> one can use <code>settings["domain.param"]</code>. Can be reversed with <a href="io.html#Persefone.prepareTOML-Tuple{Any}"><code>prepareTOML</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/input.jl#L102-L109">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.getsettings" href="#Persefone.getsettings"><code>Persefone.getsettings</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">getsettings(configfile, seed=nothing)</code></pre><p>Combines all configuration options to produce a single settings dict. Precedence: commandline parameters - user config file - default values</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/input.jl#L38-L43">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.loadmodelobject-Tuple{String}" href="#Persefone.loadmodelobject-Tuple{String}"><code>Persefone.loadmodelobject</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">loadmodelobject(fullfilename)</code></pre><p>Deserialise a model object that was previously saved with <code>[savemodelobject](@ref)</code>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/input.jl#L190-L194">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.parsecommandline-Tuple{}" href="#Persefone.parsecommandline-Tuple{}"><code>Persefone.parsecommandline</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">parsecommandline()</code></pre><p>Certain software parameters can be set via the commandline.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/input.jl#L153-L157">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.preprocessparameters-Tuple{Dict{String, Any}, String}" href="#Persefone.preprocessparameters-Tuple{Dict{String, Any}, String}"><code>Persefone.preprocessparameters</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">preprocessparameters(settings)</code></pre><p>Take the raw input parameters and process them where necessary (e.g. convert types or perform checks). This is a helper function for <a href="io.html#Persefone.getsettings"><code>getsettings</code></a>.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/input.jl#L76-L81">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.@chance-Tuple{Any}" href="#Persefone.@chance-Tuple{Any}"><code>Persefone.@chance</code></a> — <span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia hljs">@chance(odds)</code></pre><p>Return true if a random number is less than the odds (0.0 <= <code>odds</code> <= 1.0), using the model RNG. This is a utility wrapper that can only be used a context where the <code>model</code> object is available.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/input.jl#L142-L148">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.@param-Tuple{Any}" href="#Persefone.@param-Tuple{Any}"><code>Persefone.@param</code></a> — <span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia hljs">@param(domainparam)</code></pre><p>Return a configuration parameter from the global settings. The argument should be in the form <code><domain>.<parameter></code>, for example <code>@param(core.outdir)</code>. Possible values for <code><domain></code> are <code>core</code>, <code>nature</code>, <code>farm</code>, or <code>crop</code>. For a full list of parameters, see <code>src/parameters.toml</code>.</p><p>Note: this macro only works in a context where the <code>model</code> object is available!</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/input.jl#L20-L31">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.@rand-Tuple" href="#Persefone.@rand-Tuple"><code>Persefone.@rand</code></a> — <span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia hljs">@rand(args...)</code></pre><p>Return a random number or element from the sample, using the model RNG. This is a utility wrapper that can only be used a context where the <code>model</code> object is available.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/input.jl#L120-L126">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.@shuffle!-Tuple{Any}" href="#Persefone.@shuffle!-Tuple{Any}"><code>Persefone.@shuffle!</code></a> — <span class="docstring-category">Macro</span></header><section><div><pre><code class="language-julia hljs">@shuffle!(collection)</code></pre><p>Shuffle the given collection in place, using the model RNG. This is a utility wrapper that can only be used a context where the <code>model</code> object is available.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/input.jl#L131-L137">source</a></section></article><h2 id="output.jl"><a class="docs-heading-anchor" href="#output.jl">output.jl</a><a id="output.jl-1"></a><a class="docs-heading-anchor-permalink" href="#output.jl" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.LOGFILE" href="#Persefone.LOGFILE"><code>Persefone.LOGFILE</code></a> — <span class="docstring-category">Constant</span></header><section><div><p>Log output is saved to <code>simulation.log</code> in the output directory</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L8">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.RECORDDIR" href="#Persefone.RECORDDIR"><code>Persefone.RECORDDIR</code></a> — <span class="docstring-category">Constant</span></header><section><div><p>All input data are copied to the <code>inputs</code> folder within the output directory</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L11">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.DataOutput" href="#Persefone.DataOutput"><code>Persefone.DataOutput</code></a> — <span class="docstring-category">Type</span></header><section><div><pre><code class="language-julia hljs">DataOutput</code></pre><p>A struct for organising model output. This is used to collect model data in an in-memory dataframe or for CSV output. Submodels can register their own output functions using <a href="io.html#Persefone.newdataoutput!"><code>newdataoutput!</code></a>.</p><p>Struct fields: - name: a string identifier for the data collection (used as file name) - header: a list of column names - outputfunction: a function that takes a model object and returns data values to record (formatted as a vector of vectors) - frequency: how often to call the output function (daily/monthly/yearly/end/never) - plotfunction: a function that takes a model object and returns a Makie figure object (optional)</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L142-L155">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.createdatadir-Tuple{String, Union{Bool, String}}" href="#Persefone.createdatadir-Tuple{String, Union{Bool, String}}"><code>Persefone.createdatadir</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">createdatadir(outdir, overwrite)</code></pre><p>Creates the output directory, dealing with possible conflicts.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L17-L21">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.modellogger" href="#Persefone.modellogger"><code>Persefone.modellogger</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">modellogger(loglevel, outdir, output="both")</code></pre><p>Create a logger object that writes output to screen and/or a logfile. This object is stored as <code>model.logger</code> and can then be used with <code>with_logger()</code>. Note: requires <a href="io.html#Persefone.createdatadir-Tuple{String, Union{Bool, String}}"><code>createdatadir</code></a> to be run first.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L39-L45">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.newdataoutput!" href="#Persefone.newdataoutput!"><code>Persefone.newdataoutput!</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">newdataoutput!(model, name, header, outputfunction, frequency)</code></pre><p>Create and register a new data output. This function must be called by all submodels that want to have their output functions called regularly.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L164-L169">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.outputdata" href="#Persefone.outputdata"><code>Persefone.outputdata</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">outputdata(model, force=false)</code></pre><p>Cycle through all registered data outputs and activate them according to their configured frequency. If <code>force</code> is <code>true</code>, activate all outputs regardless of their configuration.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L194-L200">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.prepareTOML-Tuple{Any}" href="#Persefone.prepareTOML-Tuple{Any}"><code>Persefone.prepareTOML</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">prepareTOML(dict)</code></pre><p>An internal utility function to re-convert the one-dimensional dict created by <a href="io.html#Persefone.flattenTOML-Tuple{Any}"><code>flattenTOML</code></a> into the two-dimensional dict needed by <code>TOML.print</code>, and convert any data types into TOML-compatible types where necessary.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L119-L125">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.saveinputfiles-Tuple{SimulationModel}" href="#Persefone.saveinputfiles-Tuple{SimulationModel}"><code>Persefone.saveinputfiles</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">saveinputfiles(model)</code></pre><p>Copy all input files into the output directory, including the actual parameter settings used. This allows replicating a run in future.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L82-L87">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.savemodelobject-Tuple{SimulationModel, String}" href="#Persefone.savemodelobject-Tuple{SimulationModel, String}"><code>Persefone.savemodelobject</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">savemodelobject(model, filename)</code></pre><p>Serialise a model object and save it to file for later reference. Includes the current model and Julia versions for compatibility checking.</p><p>WARNING: produces large files (>100 MB) and takes a while to execute.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L249-L256">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.visualiseoutput-Tuple{SimulationModel}" href="#Persefone.visualiseoutput-Tuple{SimulationModel}"><code>Persefone.visualiseoutput</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">visualiseoutput(model)</code></pre><p>Cycle through all data outputs and call their respective plot functions, saving each figure to file.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L232-L237">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.withtestlogger-Tuple{SimulationModel}" href="#Persefone.withtestlogger-Tuple{SimulationModel}"><code>Persefone.withtestlogger</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">withtestlogger(model)</code></pre><p>Replace the model logger with the currently active logger. This is intended to be used in the testsuite to circumvent a <a href="https://github.com/JuliaLang/julia/issues/48456">Julia issue</a>, where <code>@test_logs</code> doesn't work with local loggers.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/core/output.jl#L68-L74">source</a></section></article><h2 id="makieplots.jl"><a class="docs-heading-anchor" href="#makieplots.jl">makieplots.jl</a><a id="makieplots.jl-1"></a><a class="docs-heading-anchor-permalink" href="#makieplots.jl" title="Permalink"></a></h2><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.gettickmarks-Tuple{Any}" href="#Persefone.gettickmarks-Tuple{Any}"><code>Persefone.gettickmarks</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">gettickmarks(dates)</code></pre><p>Given a vector of dates, construct a selection to use as tick mark locations. Helper function for <code>[populationtrends](@ref)</code></p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/analysis/makieplots.jl#L74-L79">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.populationtrends-Tuple{SimulationModel}" href="#Persefone.populationtrends-Tuple{SimulationModel}"><code>Persefone.populationtrends</code></a> — <span class="docstring-category">Method</span></header><section><div><pre><code class="language-julia hljs">populationtrends(model)</code></pre><p>Plot a line graph of population sizes of each species over time. Returns a Makie figure object.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/analysis/makieplots.jl#L50-L55">source</a></section></article><article class="docstring"><header><a class="docstring-article-toggle-button fa-solid fa-chevron-down" href="javascript:;" title="Collapse docstring"></a><a class="docstring-binding" id="Persefone.visualisemap" href="#Persefone.visualisemap"><code>Persefone.visualisemap</code></a> — <span class="docstring-category">Function</span></header><section><div><pre><code class="language-julia hljs">visualisemap(model, date, landcover)</code></pre><p>Draw the model's land cover map and plot all individuals as points on it at the specified date. If no date is passed, use the last date for which data are available. Optionally, you can pass a landcover map image (this is needed to reduce the frequency of disk I/O for Persefone Desktop). Returns a Makie figure object.</p></div><a class="docs-sourcelink" target="_blank" href="https://git.idiv.de/persefone/persefone-model/-/tree/897e96cdbc5ff1da5b1f1061fc362f5236441128/src/analysis/makieplots.jl#L6-L14">source</a></section></article></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="simulation.html">« Simulation</a><a class="docs-footer-nextpage" href="nature.html">Nature »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="auto">Automatic (OS)</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.1.2 on <span class="colophon-date" title="Tuesday 16 July 2024 13:54">Tuesday 16 July 2024</span>. Using Julia version 1.10.4.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>