run_bioenergmod_loop: Bioenergetics model

Description Usage Arguments Details Value See Also Examples

View source: R/run_bioenergmod_loop.R

Description

Calculate daily energy supply, accounting for dynamic habitat availability and consumption in previous time steps

Usage

1
2
run_bioenergmod_loop(energyneed, energydens, habitat.available,
  habitat.accessible, habitat.added, habitat.returned, prop.accessible = NULL)

Arguments

energyneed

Daily energy required by the population

energydens

Energy density estimates for each land cover type

habitat.available

Total area of each land cover type available during each time step

habitat.accessible

Total area of each land cover type available and accessible during each time step

habitat.added

Total area of each land cover type newly added since the last time step

habitat.returned

Total area of each land cover type lost before the start of the next time step

prop.accessible

Optional; proportion of open water in each land cover type that is accessible during each time step

Details

The bioenergetics model proceeds iteratively through each time step, calculating total energy supply available and accessible, energy consumed to meet the daily energy requirements, energy shortfalls (if any), and energy leftover (if any) and carried forward to the next time step. See Dybala et al. (2016) for details of the model structure.

The 4 habitat input parameters (and optionally prop.accessible) are intended to be calculated first through a call to the calculate_habitat_change function. Units for energyneed, energydens, and the 4 habitat inputs are assumed to be internally consistent, i.e. if energydens is provided in kJ/ha, energyneed should be in kJ and the habitat inputs should be in ha.

Value

Returns a named list of data frames providing model outputs for each time step (rows) and land cover type (columns):

1) energy: summary results, including for each time step: daily energy required, total energy supply, total energy accessible, total energy consumed, and total energy shortfall

2) energy.supply: energy supply provided by each land cover type at each time step

3) energy.accessible: energy accessible provided by each land cover type at each time step

4) energy.consumed: energy consumed in each land cover type at each time step (assumed to be proportional to energy accessible)

5) energy.lost: energy lost at the end of each time step due to habitat becoming unavailable before the start of the next time step; energy is not consumed and effectively wasted

See Also

bioenergmod.mc for Monte Carlo simulation, calculate_habitat_change for calculating habitat input parameters, and calculate_energy_demand for estimating daily energy required by a population

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
energyneed = calculate_energy_demand(n=c(100,150,200), bodymass=c(0.5,0.6,0.7),
   metabolism='FMR', assimilation=0.73)
energydens = data.frame(habitat=c('A','B','C'), value=c(1,2,3))
tot = data.frame(habitat=c('A','B','C'), area=c(100,200,300))
flood = data.frame(habitat=c(rep('A',3),rep('B',3),rep('C',3)), yday=rep(c(1:3),3),
   value=c(0.9,0.8,0.7, 0.1,0.15,0.2, 0.5,0.5,0.5))
depth = data.frame(habitat=c(rep('A',3),rep('B',3),rep('C',3)), yday=rep(c(1:3),3),
   value=rep(0.9,9))
change = calculate_habitat_change(tothabitat=tot, flood=flood, time='yday',
   value='value', accessible=depth, wetsplit=FALSE)
results = run_bioenergmod_loop(energyneed=energyneed, energydens=energydens,
   habitat.available=change$openwater, habitat.accessible=change$accessible,
   habitat.added=change$added, habitat.returned=change$returned,
   prop.accessible=change$prop.accessible)

kdybala/bioenergmod documentation built on May 20, 2019, 8:28 a.m.