Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
Fauna::Parameters Struct Reference

Parameters for the herbivory module. More...

#include <parameters.h>

Public Member Functions

bool is_valid (std::string &messages) const
 Check if the parameters are valid. More...
 
bool is_valid () const
 Check if the parameters are valid. More...
 

Public Attributes

"simulation": General simulation parameters.
ForageDistributionAlgorithm forage_distribution
 Algorithm for how to distribute available forage among herbivores. More...
 
ForageEnergyContent forage_gross_energy = {19.0}
 Gross energy content for forage types [MJ/kgDM]. More...
 
int herbivore_establish_interval = 0
 Days between establishment check for herbivores. More...
 
HerbivoreType herbivore_type = HerbivoreType::Cohort
 Which kind of herbivore class to use. More...
 
bool one_hft_per_habitat = false
 Whether to allow only herbivores of one HFT in each habitat. More...
 
"output": General output options.
OutputFormat output_format = OutputFormat::TextTables
 The module that writes megafauna output to disk. More...
 
OutputInterval output_interval = OutputInterval::Annual
 Time interval for aggregating output. More...
 
Output::TextTableWriterOptions output_text_tables
 

Detailed Description

Parameters for the herbivory module.

Like in the Hft class, each member variable corresponds to a key in the TOML instruction file. Both are spelled the same, and the member variable is prefixed with the category (i.e. the TOML table). Note that general simulation parameters are in the TOML table “simulation”, but their corresponding member variables don’t have a prefix.

The initialization values are the same as in the example file under examples/megafauna.toml.

Member Function Documentation

◆ is_valid() [1/2]

bool Fauna::Parameters::is_valid ( ) const
inline

Check if the parameters are valid.

Returns
true if everything is valid, false if not

◆ is_valid() [2/2]

bool Parameters::is_valid ( std::string &  messages) const

Check if the parameters are valid.

Parameters
[out]messagesWarning and error messages.
Returns
true if everything is valid, false if not

Member Data Documentation

◆ forage_distribution

ForageDistributionAlgorithm Fauna::Parameters::forage_distribution
Initial value:
=
@ Equally
Equal forage distribution: Fauna::DistributeForageEqually.

Algorithm for how to distribute available forage among herbivores.

◆ forage_gross_energy

ForageEnergyContent Fauna::Parameters::forage_gross_energy = {19.0}

Gross energy content for forage types [MJ/kgDM].

The gross energy is the energy released by complete combustion of dry matter. It is usually measured in a bomb calorimeter.

See also
get_net_energy_from_gross_energy()
Energy Content of Forage

◆ herbivore_establish_interval

int Fauna::Parameters::herbivore_establish_interval = 0

Days between establishment check for herbivores.

A value of 0 means no re-establishment.

◆ herbivore_type

HerbivoreType Fauna::Parameters::herbivore_type = HerbivoreType::Cohort

Which kind of herbivore class to use.

◆ one_hft_per_habitat

bool Fauna::Parameters::one_hft_per_habitat = false

Whether to allow only herbivores of one HFT in each habitat.

If this is activated, the habitats in each aggregation unit must be an integer multiple of the number of HFTs. For instance, with LPJ-GUESS that means that npatch, i.e. the number of patches (=habitats) per grid cell (=aggregation unit) must be a multiple of the number of HFTs. If there are 3 HFTs, npatch can take the value of 3, 6, 9, 12, etc.

This rule is important because the aggregated output would otherwise not be comparable between aggregation units.

◆ output_format

OutputFormat Fauna::Parameters::output_format = OutputFormat::TextTables

The module that writes megafauna output to disk.

◆ output_interval

OutputInterval Fauna::Parameters::output_interval = OutputInterval::Annual

Time interval for aggregating output.

◆ output_text_tables

Output::TextTableWriterOptions Fauna::Parameters::output_text_tables

Options for Output::TextTableWriter, in TOML table "output.text_tables".


The documentation for this struct was generated from the following files: