ectotherm | R Documentation |
An implementation of the Niche Mapper ectotherm model that computes body temperature, water loss,
activity and microhabitat selection. It optionally runs the Dynamic Energy Budget (DEB) model for
computing mass budgets (inc. water budgets) and growth, development, reproduction trajectories
as constrained by food, activity and temperature (see Details). When not running the DEB model
a user-specified mass is used as well as a allometric (mass and body temperature) function to
compute metabolic rate.
NOTE: The microclimate model, e.g. micro_global
, must be run prior to running the ectotherm model
ectotherm(Ww_g, shape, alpha_max, alpha_min, T_F_min, T_F_max, T_B_min, T_RB_min, CT_max, CT_min,
T_pref, diurn, nocturn, crepus, shade_seek, burrow, climb, shdburrow, mindepth, maxdepth,
M_1, M_2, M_3, pct_wet, F_O2, delta_air, ...)
Ww_g |
= 40, Wet weight of animal (g), note this model is 'steady state' so no lags in heating/cooling due to mass |
shape |
= 3, Organism shape, 0-5, Determines whether standard or custom shapes/surface area/volume relationships are used: 0=plate, 1=cyl, 2=ellips, 3=lizard (desert iguana), 4=frog (leopard frog), 5=custom (see details) |
alpha_max |
= 0.85, Maximum solar absorptivity, 0-1 |
alpha_min |
= 0.85, Maximum solar absorptivity, 0-1 |
T_F_min |
= 24, Minimum foraging temperature, °C (also affects burrow depth selection) |
T_F_max |
= 34, Maximum foraging temperature, °C |
T_B_min |
= 17.5, Minimum basking temperature, °C |
T_RB_min |
= 17.5, Minimum temperature at which animal will move from retreat to basking site, °C |
T_pref |
= 30, Preferred body temperature, °C |
CT_max |
= 40, Critical thermal maximum, °C (affects burrow depth selection and may be used to impose death from heat stress) |
CT_min |
= 6, Critical thermal minimum, °C (affects burrow depth selection and may be used to impose death from cold stress) |
diurn |
= 1, Diurnal activity allowed? 1=yes, 0=no |
nocturn |
= 0, Nocturnal activity allowed? 1=yes, 0=no |
crepus |
= 0, Crepuscular activity allowed? 1=yes, 0=no |
shade_seek |
= 1, Shade seeking allowed? 1=yes, 0=no |
burrow |
= 1 Shelter in burrow allowed? 1=yes, 0=no |
climb |
= 0, Climbing to seek cooler habitats allowed? 1=yes, 0=no |
shdburrow |
= 0, Choose if the animal's retreat is in the open (0), in the shade when above or below CTmin in sun (1) or in shade always (2) |
mindepth |
= 2, Minimum depth (soil node #) to which animal can retreat if burrowing |
maxdepth |
= 10, Maximum depth (soil node #) to which animal can retreat if burrowing |
M_1 |
= 0.013, Metabolic rate parameter 1 V_O2=M_1*M^M_2*10^(M_3*Tb)*10^M_4, in ml O2 / h, default parameters for lizards based on Eq. 2 from Andrews & Pough 1985. Physiol. Zool. 58:214-231 |
M_2 |
= 0.800, Metabolic rate parameter 2 |
M_3 |
= 0.038, Metabolic rate parameter 3 |
M_4 |
= 0.000, Metabolic rate parameter 4 |
pct_wet |
= 0.1, % of surface area acting as a free-water exchanger (hourly vector or single value), for computing cutaneous water loss |
pct_eyes |
= 0.03, % of surface area taken up by open eyes, for computing ocular water loss (only when active) |
pct_mouth |
= 5, % of surface area taken up by open mouth, for computing panting water loss |
g_vs_ab |
= 0, % leaf vapour conductance, abaxial (bottom of leaf), mol/m2/s, used if leaf = 1 |
g_vs_ad |
= 0.3, % leaf vapour conductance, adaxial (top of leaf), mol/m2/s |
pantmax |
= 1, maximum multiplier on breathing rate, for respiratory water loss via panting (value of 1 prevents panting) |
F_O2 |
= 20, % oxygen extraction efficiency, for respiratory water loss |
delta_air |
= 0.1, Temperature difference (°C) between expired and inspired air, for computing respiratory water loss |
aestdepth |
= 10, Depth (soil node #) to which animal retreats if burrowing and aestivating due to desiccation |
Parameters controling how the model runs:
nyears
= micro$nyears, Number of years the simulation runs for - must be consistent with dimensions of environmental input data
enberr
= 0.01, Factor by which the mass is multiplied to obtain a tolerance level for the heat budget solution
live
= 1, 0 (no behavior or metabolism), 1 (full behaviour) or 2 (full behaviour other than orienting to the sun)?
leaf
= 0, Simulate leaf using given stomatal conductance (1), regulating stomatal openness (to g_vs_xx_max) to avoid overheating (2), or don't simulate leaf (0)?
transient
= 0, Run a transient (i.e. include heat storage) simulation (1=yes, 0=no)? No behaviour yet - assums full sun
delta_shade
= 3, Percent shade increment step, 0-100%, allowing different thermoregulatory precision (smaller values increase run time)
write_input
= 0, Write csv files of final input to folder 'csv input' in working directory? 1 = yes, 0 = no
write_csv
= 0, Write csv files of final output? 0 = no, 1 = just yearout and yearsout, 2 = all output
startday
= 1, Day of year at which simulation starts
Environmental inputs:
minshades
= micro$minshade, Vector of daily minimum shade values - can be different to value used in microclimate model (e.g. to simulate sunspot tracking on a forest floor) (%)
maxshades
= micro$maxshade, Vector of daily maximum shade values - can be different to value used in microclimate model (e.g. to simulate use of fine-scale shade in a generally unshaded habitat) (%)
fluid
= 0, Fluid type 0=air, 1=water
O2gas
= 20.95, oxygen concentration of air, to account for non-atmospheric concentrations e.g. in burrows (%)
N2gas
= 79.02, nitrogen concetration of air, to account for non-atmospheric concentrations e.g. in burrows (%)
CO2gas
= 0.0412, carbon dioxide concentration of air, to account for non-atmospheric concentrations e.g. in burrows (%)
alpha_sub
= 1 - micro$REFL, Vector of daily substrate reflectances (0-1)
epsilon_sub
= 1, Emissivity of substrate (0-1)
epsilon_sky
= 1, Emissivity of sky (0-1)
PDIF
= 0.1, Fraction of total solar radiation that is diffuse (0-1), will ultimately be made an optionally hourly vector
DEP
= micro$DEP, Depths available from the microclimate model simulation
KS
= micro$KS[seq(1, 19, 2)], Depth-specific saturated hydraulic conductivity (kg s/m3) from the microclimate model simulation, for modelling liquid exchange with substrate
b
= micro$BB[seq(1, 19, 2)], Depth-specific Campbell's b parameter (-) from the microclimate model simulation, for modelling liquid exchange with substrate
PE
= micro$PE[seq(1, 19, 2)], Depth-specific air-entry water potential (J / kg) from the microclimate model simulation, for modelling liquid exchange with substrate
metout
= micro$metout, Microclimate model output for above ground, minimum shade conditions
shadmet
= micro$shadmet, Microclimate model output for above ground, maximum shade conditions
soil
= micro$soil, Microclimate model output for soil temperature, minimum shade conditions
shadsoil
= micro$shadsoil, Microclimate model output for soil temperature, maximum shade conditions
soilmoist
= micro$soilmoist, Microclimate model output for soil moisture, minimum shade conditions
shadmoist
= micro$shadmoist, Microclimate model output for soil moisture, maximum shade conditions
humid
= micro$humid, Microclimate model output for soil humidity, minimum shade conditions
shadhumid
= micro$shadhumid, Microclimate model output for soil humidity, maximum shade conditions
soilpot
= micro$soilpot, Microclimate model output for soil water potential, minimum shade conditions
shadpot
= micro$shadpot, Microclimate model output for soil water potential, maximum shade conditions
tcond
= micro$tcond, Microclimate model output for soil thermal conductivity, minimum shade conditions
shadtcond
= micro$shadtcond, Microclimate model output for soil thermal conductivity, maximum shade conditions
rainfall
= micro$RAINFALL, Vector of daily rainfall (mm)
rainhr
= rep(-1,nrow(metout)), Vector of hourly rainfall (mm), overwrites rainfall if not negative
preshr
= rep(101325 * ((1 - (0.0065 * as.numeric(micro$elev) / 288)) ^ (1/0.190284)), nrow(metout)), Vector of hourly atmospheric pressure (Pa), defaulting to elevation-adjusted values
elev
= as.numeric(micro$elev), Elevation of simulation (m), obtained from microclimate model output by default
longitude
= micro$longlat[1], Longitude (decimal degrees), obtained from microclimate model output by default
latitude
= micro$longlat[2], Latitude (decimal degrees), obtained from microclimate model output by default
Morphological parameters:
custom_shape
= c(10.4713,.688,0.425,0.85,3.798,.683,0.694,.743), Custom shape coefficients. Operates if shape=5, and consists of 4 pairs of values representing the parameters a and b of a relationship AREA=a*mass^b, where AREA is in cm2 and mass is in g. The first pair are a and b for total surface area, then a and b for ventral area, then for sillhouette area normal to the sun, then sillhouette area perpendicular to the sun
shape_a
= 1, Proportionality factor (-) for going from volume to area, keep this 1 (redundant parameter that should be removed)
shape_b
= 3, Proportionality factor (-) for going from volume to area, represents ratio of width:height for a plate, length:diameter for cylinder, b axis:a axis for ellipsoid
shape_c
= 0.6666666667, Proportionality factor (-) for going from volume to area, represents ratio of length:height for a plate, c axis:a axis for ellipsoid
orient
= 0, orientation of shape relevant to shapes 0, 1 & 2, 0 means plate lying flat, cylinder lengthwise, prolate ellipsoid, 1 means plate on edge, cylinder upright, oblate spheroid and ellipsoid
conv_enhance
= 1, convective enhancement factor, accounting for enhanced turbulent convection in outdoor conditions compared to what is measured in wind tunnels, see Kolowski & Mitchell 1976 10.1115/1.3450614 and Mitchell 1976 10.1016/S0006-3495(76)85711-6
fatosk
= 0.4, Configuration factor to sky (-) for infrared calculations
fatosb
= 0.4, Configuration factor to subsrate for infrared calculations
rinsul
= 0, Insulative fat layer thickness (not yet functional) (m)
pct_cond
= 10, Percentage of animal surface contacting the substrate (%)
pct_touch
= 0, Percentage of animal surface area contacting another animal of same temperature (%)
c_body
= 3073, Specific heat of flesh J/(kg-K)
k_flesh
= 0.5, Thermal conductivity of flesh (W/mC, range: 0.412-2.8)
rho_body
= 1000, Density of flesh (kg/m3)
epsilon
= 0.95, Emissivity of animal (0-1)
eggshape_a
= 1, Proportionality factor (-) for going from volume to area, keep this 1 (redundant parameter that should be removed)
eggshape_b
= 0.6666666667, Proportionality factor (-) for going from volume to area, represents ratio of width:height for a plate, length:diameter for cylinder, b axis:a axis for ellipsoid
eggshape_c
= 0.6666666667, Proportionality factor (-) for going from volume to area, represents ratio of length:height for a plate, c axis:a axis for ellipsoid
eggmult
= 1 # multiply egg mass by clutch size for heat and water exchange calculations?
pct_cond_egg
= 50, Percentage of egg surface contacting the substrate (%)
Behavioural parameters:
postur
= 1, postural orientation to sun, 1 = perpendicular, 2 = parallel, 0 = half way between (relevant if live = 0), 3 = normal silhouette area but not tracking sun
warmsig
= 0, Warming signal for emergence? °C/h (if in burrow deeper than node 2, change in burrow temp must be exceed warmsig)
fossorial
= 0, Fossorial activity? 1=yes, 0=no (this option hasn't been properly implemented)
rainact
= 0, Activity is limited by rainfall? 1=yes, 0=no, threshold rainfall for activity set by actrainthresh
actrainthresh
= 0.1, Threshold (mm) of rain causing activity if rainact
=1
soilnode
= 4, Soil node (1-10, corresponding to values in DEP
) at which eggs are laid (overridden if amphibreed
=1)
eggshade
= 0, are eggs laid in shade? 0=no, 1=yes
aquabask
= 0, If aquatic, does it bask? 0=no, stay at water temp, 1=yes, when not hungry, 2=all the time
g_vs_ab_max
= 0, % max leaf vapour conductance, abaxial (bottom of leaf), mol/m2/s, used if leaf = 1
g_vs_ad_max
= 0.3, % max leaf vapour conductance, adaxial (top of leaf), mol/m2/s
Thermal physiological parameters:
CT_minthresh
= 12, Number of consecutive hours below CT_min that leads to death - simulation will terminate beyond this threshold if CT_kill
=1
CT_kill
= 0, Animal dies when it hits critical thermal limits? 1=yes, 0=no
Water and food budget parameters (first eight only relevant if DEB
=1):
pct_H_P
= 73, Water in faeces (product) (%)
pct_H_N
= 0, Water in excreted nitrogenous waste (%)
pct_H_X
= 82, Water content of food (%), single value or hourly vector
pct_H_R
= 15, Minimum tolerated dehydration (% of wet mass) - prohibits foraging if greater than this
pct_H_death
= 35, Maximum tolerated dehydration (% of wet mass) - causes death if greater than this
gutfill
= 75, Gut fill (%) at which satiation occurs - if greater than 100%, animal always tries to forage
raindrink
= 0, Rainfall level at which rehydration from drinking occurs - if 0 animal can always drink
foodlim
= 1, Is the animal food limited - if 0 animal can always find food (useful for making different life stages dependent on soil moisture-based food estimates
RQ
= 0.8, respiratory quotient (0-1), computed from first principles if DEB model running
K_skin
= 0, - Hydraulic conductance of skin (kg/(m2 s (J/kg)) - drives liquid water exchange with substrate
spec_hyd_body
= 0.000304, Specific hydration of body (m3 / (m3 (J/kg))) - drives liquid water exchange with substrate if K_skin > 0
psi_body
= -707, Water potential of body (J/kg) - drives liquid water exchange with substrate if K_skin > 0 and will also affect skin humidity for water vapour exchange
H2Obal_init
= 0, Water balance of body (g) - initial water balance, where positive means excess water
K_egg
= 2.8e-09, Hydraulic conductance of egg shell (kg/(m2 s (J/kg)) - drives liquid water exchange with substrate
spec_hyd_egg
= 0.000304, Specific hydration of egg (m3 / (m3 (J/kg))) - drives liquid water exchange with substrate if K_skin > 0
psi_egg
= -707, Water potential of egg (J/kg) - drives liquid water exchange with substrate if K_skin > 0
liq_init
= Ww_g, Initial mass for egg liquid exchange (g) - total mass of egg which is used as the reference point
Dynamic Energy Budget (DEB) model parameters:
DEB
= 0, Run the DEB model (1) or just heat balance (0). Latter uses allometrically predicted respiration base on M_1
, M_2
, M_3
and M_4
intmethod
= 1, Use Euler (0) or DOPRI (1) method for integrating non-insect DEB model. Latter will be more accurate but slower
metab_mode
= 0, Run insect model? 0 = no, 1 = hemimetabolus model (abp DEB model), 2 = holometabolous model (hex DEB model)
z_mult
= 1, Scaling factor for DEB body-size covariation relationships - use it to make a metabolically scaled larger or smaller version of your animal
Core DEB parameters:
z
= 2.825*z_mult, Zoom factor (cm)
del_M
= 0.2144, Shape coefficient (-)
p_Xm
= 12420, Surface area-specific maximum feeding rate J/cm2/h
kap_X
= 0.85, Digestive efficiency (0-1)
v
= 0.02795/24, Energy conductance (cm/h)
kap
= 0.8206, Fraction of mobilised reserve allocated to soma
p_M
= 48.81/24, Volume-specific somatic maintenance (J/cm3/h)
E_G
= 7512, Cost of structure, including overheads (J/cm3)
kap_R
= 0.95, Fraction of reproduction energy fixed in eggs
k_J
= 0.006498/24, Maturity maintenance rate coefficient (1/h)
E_Hb
= 866.6*z_mult^3, Maturity at birth (J)
E_Ho
= 866.6*z_mult^3, Maturity of embryo at oviposition (J)
E_Hj
= E_Hb*z_mult^3, Maturity at metamorphosis (if different to E_Hb, triggers metabolic acceleration) (J)
E_Hp
= 1.019e+04*z.mult^3, Maturity at puberty
E_He
= E_He*z_mult^3, Maturity at eclosion (J) (relevant only for holometabolous model)
h_a
= 1.051e-08*z_mult/(24^2), Weibull ageing acceleration (1/h2)
s_G
= 0.01, Gompertz stress coefficient (-)
E_0
= 9220*z_mult^4, Energy content of the egg (derived from core parameters via backwards integation from birth to time zero) (J)
Thermal DEB parameters:
arrhen_mode
= 1, equation used for Arrhenius rate correction - 0 is original Sharpe-Schoolfield formulation, 1 is version used in DEB tempcorr function from AmPtool
T_REF
= 20 + 273.15, Reference temperature for rate correction (°C)
T_A
= 8817 Arhhenius temperature
T_AL
= 50000, Arrhenius temperature for decrease below lower boundary of tolerance range T_L
T_AH
= 90000, Arrhenius temperature for decrease above upper boundary of tolerance range T_H
T_L
= 6 + 273.15, Lower boundary (K) of temperature tolerance range for Arrhenius thermal response
T_H
= 33 + 273.15, Upper boundary (K) of temperature tolerance range for Arrhenius thermal response
T_A2
= 8817 Arhhenius temperature
for maturity maintenance (causes 'Temperature Size Rule' effect)
T_AL2
= 50000, Arrhenius temperature for decrease below lower boundary of tolerance range T_L
for maturity maintenance (causes 'Temperature Size Rule' effect)
T_AH2
= 90000, Arrhenius temperature for decrease above upper boundary of tolerance range T_H
for maturity maintenance (causes 'Temperature Size Rule' effect)
T_L2
= 6 + 273.15, Lower boundary (K) of temperature tolerance range for Arrhenius thermal response
for maturity maintenance (causes 'Temperature Size Rule' effect)
T_H2
= 33 + 273.15, Upper boundary (K) of temperature tolerance range for Arrhenius thermal response
for maturity maintenance (causes 'Temperature Size Rule' effect)
Compound/derived DEB parameters:
E_m
= (p_M * z / kap) / v, Maximum reserve density (J/cm3)
Food-related axilliary DEB parameters:
f
= 1, functional response (-), usually kept at 1 because gut model controls food availability such that f=0 when gut empty
E_sm
= 350, Maximum structure-specific energy density of stomach (J/cm3)
K
= 1, Half saturation constant (J/cm2)
X
= 10, Food density (J/cm2) or total food available per hour (J), depending on the 'foodmode' option, single value or hourly vector
foodmode
= 0, 0 assumes X is food density as J/cm2, 1 treats food density as an absolute input to the stomach to simulate single-sized prey items for gape-limited predators
Composition-related axilliary DEB parameters:
rho_body_deb
= rho_body/1000, Animal density (g/cm3)
d_V
= 0.3, Dry mass fraction of structure (0-1)
d_E
= 0.3, Dry mass fraction of reserve (0-1)
d_Egg
= 0.3, Dry mass fraction of egg (0-1)
stoich_mode
= 0, adjust chemical indices to chemical potentials (0) or vice versa (1) or leave as is (2)
mu_X
= 525000, Molar Gibbs energy (chemical potential) of food (J/mol)
mu_E
= 585000, Molar Gibbs energy (chemical potential) of reserve (J/mol)
mu_V
= 500000, Molar Gibbs energy (chemical potential) of structure (J/mol)
mu_P
= 480000, Molar Gibbs energy (chemical potential) of faeces (J/mol)
mu_N
= 244e3/5, Molar Gibbs energy (chemical potential) of nitrogenous waste (J/mol), synthesis from NH3, Withers page 119
kap_X_P
= 0.1, Faecation efficiency of food to faeces (-)
n_X
= c(1, 1.8, 0.5, 0.15), chem. indices of C, O, H and N in food
n_E
= c(1, 1.8, 0.5, 0.15), chem. indices of C, O, H and N in reserve
n_V
= c(1, 1.8, 0.5, 0.15), chem. indices of C, O, H and N in structure
n_P
= c(1, 1.8, 0.5, 0.15), chem. indices of C, O, H and N in faeces
n_M_nitro
= c(1, 4/5, 3/5, 4/5), chem. indices of C, O, H and N in nitrogenous waste
h_N
= 384238, molar enthalpy of nitrogenous waste (combustion frame of reference) (J/mol), overridden if n_M_nitro specified as urea, uric acid or ammonia
Holometabolous insect DEB model parameters:
stages
= 8, number of stages = number of instars plus 1 for egg + 1 for pupa + 1 for imago
kap_V
= 0.8, conversion efficient E -> V -> E (-)
k_Ee
= 0.06293 / 24, reproduction buffer turnover of imago (1/h)
k_EV
= 0.03111 / 24, spec decay rate of larval structure in pupa (1/h)
S_instar
= rep(2.049137, stages), stress at instar n: L_n^2/ L_n-1^2 (-)
s_j
= 0.9985855, Reprod buffer/structure ratio at pupation as fraction of max
L_b
= 0.0734, Structural length at birth (cm)
Inital conditions for DEB model:
V_init
= 3e-9, Initial structural volume (cm3)
E_init
= E_0/V_init, Initial reserve density (J/cm3)
E_H_init
= 0, Initial maturity (J)
E_S_init
= 0, Intial stomach energy (J)
E_R_init
= 0, Initial reproductive energy (J)
E_B_init
= 0, Initial reproduction batch energy (J)
q_init
= 1, Initial aging acceleration (1/t2)
hs_init
= 0, Initial hazard rate (1/t)
p_surv_init
= 1, Initial cumulative survival probability (1/t)
pregnant_init
= 0, Initial pregnancy state
V_baby_init
= 3e-9, Initial structural volume of baby (cm3)
E_baby_init
= E_0/V_baby_init, Initial reserve density of baby (J/cm3)
E_H_baby_init
= 0, Initial maturity of baby (J)
stage
= 0, Initial stage (STD model: 0=embryo, 1=juvenile, 2=mature but not yet reproducing, 3=beyond first reproduction, Insect models: 0=embryo, 1-(stages-1)=instar, with pupa as penultimate, stages=adult
Metabolic depression and starvation parameters:
aestivate
= 0, Does the animal aestivate/go into torpor? 1=yes, 0=no
depress
= 1, Fraction by which p_M
, k_J
and v
are reduced during torpor
starvemode
= 1, Determines how reproduction buffer is used during starvation, where 0 means it is not used, 1 means it is used before structure is mobilised and 2 means it is used to maximise reserve density
Reproductive phenology model parameters:
clutchsize
= 5, Clutch size (#), overridden by clutch_ab
clutch_ab
= c(0,0), # paramters for relationship between length (cm) and clutch size: clutch size = a*SVL+b, make a and b zero if fixed clutch size
viviparous
= 0, Viviparous reproduction? 0=no, 1=yes (if yes, animal will be held in adult-sided female's body for duration of development, set by E_Ho, and will experience her body temperature
minclutch
= 0, Minimum clutch size if not enough in reproduction buffer for clutch size predicted by clutch_ab
- if zero, will not operate
maxclutch
= 0, Maximum clutch size to cap clutch size predicted by clutch_ab
- if zero, will not operate
cond_clutch
= 0, clutch size proportional to (1) or independent (0) of body condition
batch
= 1, Invoke Pequerie et al.'s batch laying model?
photostart
= 3, Photoperiod response triggering ovulation, none (0), summer solstice (1), autumnal equinox (2), winter solstice (3), vernal equinox (4), specified daylength thresholds (5 - uses daylengthstart
and daylengthfinish
)
photofinish
= 1, Photoperiod terminating ovulation, none (0), summer solstice (1), autumnal equinox (2), winter solstice (3), vernal equinox (4), specified daylength thresholds (5 - uses daylengthstart
and daylengthfinish
)
daylengthstart
= 12.5, Threshold daylength (h) for initiating breeding
daylengthfinish
= 13, Threshold daylength (h) for terminating breeding
photodirs
= 1, Is the start daylength trigger during a decrease (0) or increase (1) in day length?
photodirf
= 0, Is the finish daylength trigger during a decrease (0) or increase (1) in day length?
amphibreed
= 0, Amphibious animal breeding mode: 0 is off, 1 is exotrophic aquatic (eggs start when water present in container and within breeding season), 2 is exotrophic terrestrial/aquatic (eggs start at specified soil node within breeding season, diapause at birth threshold, start larval phase if water present in container), 3 endotrophic terrestrial (eggs start at specified soil node within breeding season and continue to metamorphosis on land), 4 turtle mode (eggs start at specified soil node within breeding season, hatch and animals enter water and stay there for the rest of their life, but leave the water if no water is present)
amphistage
= 0, Life cycle control for amphibious animal: 0 is whole life cycle, 1 is just to metamorphosis (then reset and start again)
reset
= 0, Life cycle reset options, 0=quit simulation upon death, 1=restart at emergence, 2=restart at first egg laid, 3=restart at end of breeding season, 4=reset at death
act_breed
= 0, Threshold numbers of hours active after start of breeding season before eggs can be laid (simulating movement to the breeding site)
rain_breed
= 0, Rain dependent breeder? 0 means no, otherwise enter rainfall threshold in mm
Tb_breed
= 200, Body temperature threshold below which breeding will occur
Tb_breed_hrs
= 24*7, Cumulative time below temperature threshold for breeding, hrs Tb_breed
that will trigger breeding
Mortality rate parameters:
m_a
= 1e-4, Hourly active mortality rate (probability of mortality per hour)
m_i
= 0, Hourly inactive mortality rate (probability of mortality per hour)
m_h
= 0.5, Survivorship of hatchling in first year
Water body model parameters (not ready yet):
container
= 0, Run the water body/container model? (aquatic start of life cycle, e.g. frog or mosquito)
wetmod
= 0, Use precomputed wetland temperature wetlandTemps
and depths wetlandDepthds
?
conth
= 100, Cylindrical container/pond height (mm)
contw
= 1000, Cylindrical container/pond diameter (mm)
contype
= 1, Is 'containter' sitting on the surface, like a bucket (0) or sunk into the ground like a pond (1)
rainmult
= 1, Rainfall multiplier to reflect catchment (don't make this zero unless you want a drought!)
continit
= 0, Initial container water level (cm)
conthole
= 0, Daily (or hourly if rainhr vector filled) loss of height (mm) due to 'hole' in container (e.g. infiltration to soil, drawdown from water tank)
contonly
= 1, Just run the container model and quit?
contwet
= 80, % of container surface acting as a free water exchanger
wetlandTemps
= matrix(data = 0, nrow = 24 * ndays, ncol = 1), Matrix of hourly wetland temperaures (°C)
wetlandDepths
= matrix(data = 0, nrow = 24 * ndays, ncol = 1), Matrix of hourly wetland depths (cm)
GLMtemps
= matrix(data = 0, nrow = 24 * ndays, ncol = 20), Matrix of hourly wetland temperatures (C) with depth
GLMO2s
= matrix(data = 0, nrow = 24 * ndays, ncol = 20), Matrix of hourly wetland PO2 (kPa) with depth
GLMsalts
= matrix(data = 0, nrow = 24 * ndays, ncol = 20), Matrix of hourly wetland salinity (ppm) with depth
GLMpHs
= matrix(data = 0, nrow = 24 * ndays, ncol = 20), Matrix of hourly wetland pH with depth
GLMfoods
= matrix(data = 0, nrow = 24 * ndays, ncol = 20), Matrix of hourly wetland food density (J/cm3) with depth
pO2thresh
= 10, Oxygen partial pressure tolerance threshold
Life stage-specific parameter allocation:
thermal_stages
= matrix(data = c(rep(CT_min, stages), rep(CT_max, stages), rep(T_F_min, stages), rep(T_F_max, stages), rep(T_B_min, stages), rep(T_pref, stages)), nrow = stages, ncol = 6), Stage specific thermal thresholds (CT_min, CT_max, T_F_min, T_F_max, T_B_min, T_pref)
behav_stages
= matrix(data = c(rep(diurn, stages), rep(nocturn, stages), rep(crepus, stages), rep(burrow, stages), rep(shdburrow, stages), rep(mindepth, stages), rep(maxdepth, stages), rep(shade_seek, stages), rep(climb, stages), rep(fossorial, stages), rep(rainact, stages), rep(actrainthresh, stages), rep(act_breed, stages), rep(flyer, stages), rep(aquabask, stages)), nrow = stages, ncol = 15), Stage specific behaviour diurn, nocturn, crepus, burrow, shdburrow, mindepth, maxdepth, shade_seek, climb, fossorial, rainact, actrainthresh, act_breed, flyer, aquabask)
water_stages
= matrix(data = c(rep(pct_wet[1], stages), rep(F_O2, stages), rep(pct_H_P, stages), rep(pct_H_N, stages), rep(pct_H_X, stages), rep(pct_H_R, stages), rep(raindrink, stages), rep(gutfill, stages)), nrow = stages, ncol = 8), Stage-specific water budget parameters (pct_wet[1], F_O2, pct_H_P, pct_H_N, pct_H_X, pct_H_R, raindrink, gutfill)
nutri_stages
= matrix(data = c(rep(foodlim, stages), rep(0, stages)), nrow = stages, ncol = 1), Stage-specific nutritional parameters (foodlim)
arrhenius
= matrix(data = matrix(data = c(rep(T_A, stages), rep(T_AL, stages), rep(T_AH, stages), rep(T_L, stages), rep(T_H, stages)), nrow = stages, ncol = 5), nrow = stages, ncol = 5), Stage-specific 5-parameter Arrhenius thermal response for DEB model (T_A, T_AL, T_AH, T_L, T_H)
arrhenius2
= matrix(data = matrix(data = c(rep(T_A2, stages), rep(T_AL2, stages), rep(T_AH2, stages), rep(T_L2, stages), rep(T_H2, stages)), nrow = stages, ncol = 5), nrow = stages, ncol = 5), Stage-specific 5-parameter Arrhenius thermal response for DEB model (T_A, T_AL, T_AH, T_L, T_H) for maturity maintenance (causes 'Temperature Size Rule' effect)
Butterfly and flight model parameters (not yet tested):
wings
= 0, Turn wing model on? 1=yes, 0=no
rho1_3
= 0.2, Wing reflectance (0-1)
trans1
= 0.00, Wing transmissivity (0-1)
aref
= 0.26, Width of surface #2 (cm) (back or horizontal or reference surface)
bref
= 2.04, Common length (cm) where the two rectangles join
cref
= 1.47, Width of surface #1 (cm) (wing)
phi
= 179., Initial wing angle (degrees) (90 = vertical relative to body)
phimax
= phi, Maximum wing angle (degrees) (90 = vertical relative to body)
phimin
= phi, Minimum wing angle (degrees) (90 = vertical relative to body)
flyer
= 0, Does the animal fly? 1=yes, 0=no
flymetab
= 0, metabolic cost of flight, W
flyhigh
= 0, Does the animal fly at ref height? 1=yes, 0=no
flyspeed
= 5, flight speed (m/s)
Outputs:
environ variables:
1 DOY - Day of year
2 YEAR - Year of simulation
3 DAY - Day of simulation
4 TIME - Time of day (hours)
5 TC - Body temperature (°C)
6 SHADE - Shade selected (%)
7 SOLAR - Solar radiation (W/m2) at animal location
8 DEP - Depth below ground (cm)
9 ACT - Activity state (0=inactive, 1=basking, 2=foraging)
10 TA - Air temperature (°C) at animal location
11 TSUB - air temperature (°C) at animal location
12 TSKY - air temperature (°C) at animal location
13 VEL - Wind speed (m/s) at animal location
14 RELHUM - Relative humidity (%) at animal location
15 ZEN - Zenith angle of sun (degrees - 90 = below the horizon)
16 CONDEP - Depth of water body (mm) (may not be simulated or supplied)
17 WATERTEMP - Temperature of water body (°C) (may not be simulated or supplied)
18 DAYLENGTH - Day length (hours)
19 WINGANGLE - Wing angle (degrees) for butterfly model
20 WINGTEMP - Wing temperature (°C) for butterfly model
21 FLYING - Flying state (1=flying, 0=not flying) for butterfly model
22 FLYTIME - Flying time (hours) for butterfly model
23 PO2WATER - dissolved oxygen in water, if running GLM water body model
24 SALWATER - salinity of water, if running GLM water body model
25 ABSAN - solar absorptivity (fractional)
26 PCOND - proportion of animal's surface in contact with ground (fractional)
27 POSTURE - postural orientation (1=perpendicular to sun, 2=parallel, 0=in-between)
28 PANT - panting level
29 PCTWET - skin wetness or stomatal openness (/
enbal variables:
1 DOY - Day of year
2 YEAR - Year of simulation
3 DAY - Day of simulation
4 TIME - Time of day (hours)
5 QSOL - Solar radiation absorbed (W)
6 QIRIN - Infrared radiation absorbed (W)
7 QMET - Metabolic heat production (W)
8 QRESP - Respiratory heat loss (W)
9 QEVAP - Evaporative heat loss (W)
10 QIROUT - Infrared radiation lost (W)
11 QCONV - Heat lost by convection (W)
12 QCOND - Heat lost by conduction (W)
13 ENB - Energy balance (W)
14 NTRY - Iterations that were required for solution to heat balance equation
masbal variables:
1 DOY - Day of year
2 YEAR - Year of simulation
3 DAY - Day of simulation
4 TIME - Time of day (hours)
5 O2_ml - Oxygen consumption rate (ml/h)
6 CO2_ml - Carbon dioxide production rate (ml/h)
7 NWASTE_g - Nitrogenous waste production (g/h)
8 H2OFree_g - Water from food (g/h)
9 H2OMet_g - Metabolic water production (g/h)
10 DryFood_g - Dry food intake (g/h)
11 WetFood_g - Wet food intake (g/h)
12 DryFaeces_g - Dry faeces production (g/h)
13 WetFaeces_g - Wet faeces production (g/h)
14 Urine_g - Urine production (g/h)
15 H2OResp_g - Respiratory water loss (g/h)
16 H2OCut_g - Cutaneous water loss (g/h)
17 H2OEye_g - Ocular water loss (g/h)
18 H2OBal_g - Instantaneous water balance (g/h)
19 H2OCumBal_g - Cumulative water balance (g)
20 H2OLiq_g - Change in liquid water exchange with substrate (g)
21 PSI_kPa - Organism water potential (J/kg = kPa)
debout variables:
1 DOY - Day of year
2 YEAR - Year of simulation
3 DAY - Day of simulation
4 TIME - Time of day (hours)
5 Stage - Life cycle stage (0=embryo, 1=juvenile, 2=mature but not yet reproducing, 3=beyond first reproduction)
6 V - Structural volume (cm3)
7 E - Reserve density (J/cm3)
8 E_H - Maturity state (J)
9 L_W - Physical length (mm) (what this represents depends on choice of length measure for DEB paramter fitting, e.g. snout-vent length, head length, etc.)
10 WETMASS - Wet mass total (reserve, structure, reproduction buffer, stomach contents) (g)
11 WETGONAD - Wet mass of gonad (batch and reproduction buffers) (g)
12 WETGUT - Wet mass of food in gut (g)
13 PCT_DESIC - % desiccated
14 E_S - Energy in stomach (J)
15 E_R - Energy in reproduction buffer (J)
16 E_B - Energy in batch for egg production (J)
17 BREEDING - Breeding state (1=breeding, 0=not breeding)
18 PREGNANT - Pregnant? (only if viviparous) (0 or 1)
19 V_BABY - Structure of baby (cm3) (only if viviparous and pregnant)
20 E_BABY - Reserve density of baby (J/cm3) (only if viviparous and pregnant)
21 H_S - Hazard rate (1/h)
22 Q - Aging acceleration (1/h^2)
23 P_SURV - Survival probability due to joint influence of ageing and mortality rates
24 P_A - assimilation flux (J/h)
25 P_C - mobilisation flux (J/h)
26 P_M - maintenance flux (J/h)
27 P_G - growth flux (J/h)
28 P_D - dissipation flux (J/h)
29 P_J - maturity maintenance flux (J/h)
30 P_R - reproduction/maturation flux (J/h)
31 P_B - egg flux (J/h)
yearout variables:
1 DEVTIME - Development time (days)
2 BIRTHDAY - Birth day (day of year)
3 BIRTHMASS - Mass at birth (g)
4 MONMATURE - Months to maturity
5 LENREPRO - Length (mm) at first reproduction
6 FECUNDITY - Total fecundity
7 CLUTCHES - Total clutches
8 MINRESERVE - Minimum reserve density (J/cm3)
9 LASTFOOD - Food in last year (kg)
10 TOTFOOD - Total food eaten (kg)
11 MINTB - Minimum body temperature (°C)
12 MAXTB - Maxmium body temperature (°C)
13 Pct_Des - Maximum level of desiccation (/
14 LifeSpan - Maximum life span (days)
15 GenTime - Generation time (years)
16 R0 - Net reproductive rate
17 rmax - Intrinsic rate of increase
18 LENGTH - Maximum length (mm)
yearsout variables:
1 YEAR - Year of simulation
2 MaxStg - Maximum stage reached in the year
3 MaxWgt - Maximum weight reached in the year (g)
4 MaxLen - Maximum length in the year (mm)
5 Tmax - Maximum annual body temperature (°C)
6 Tmin - Minimum annual body temperature (°C)
7 MinRes - Minimum annual reserve density (J/cm3)
8 MaxDes - Maximum annual desiccation level (
9 MinShade - Minimum annual shade selected
10 MaxShade - Maximum annual shade selected
11 MinDep - Minimum annual depth selected (cm)
12 MaxDep - Maximum annual depth selected (cm)
13 Bsk - Annual basking hours
14 Forage - Annual foraging hours
15 Dist - Annual distance travelled (flying insect) (km)
16 Food - Annual food eaten (g, dry)
17 Drink - Annual water drunk (g)
18 NWaste - Annual nitrogenous waste (g)
19 Faeces - Annual faeces production (g, dry)
20 O2 - Annual O2 production (ml)
21 Clutch - Annual clutches (#)
22 Fec - Annual fecundity (#)
23 CauseDeath - Cause of death, 0=no death, 1=cold, 2=heat, 3=desiccation, 4=starvation, 5=ageing
24 tLay - Day of year at which eggs laid
25 tEgg - Day of year entering egg stage
26-33 tStg1-tStg8 - Day of year entering life cycle stages 1-8
34-41 mStg1-mStg8 - Body weight upon entering life cycle stages 1-8 (g, wet)
42 surviv - Survival probability at end of given year
43 deathstage - Life stage at which death occurred
# run the microclimate model
micro <- micro_global(loc = c(145.620, -16.821)) #Kuranda, Queensland
# retrieve output
metout <- as.data.frame(micro$metout) # above ground microclimatic conditions, min shade
shadmet <- as.data.frame(micro$shadmet) # above ground microclimatic conditions, max shade
soil <- as.data.frame(micro$soil) # soil temperatures, minimum shade
shadsoil <- as.data.frame(micro$shadsoil) # soil temperatures, maximum shade
# append dates
dates <- micro$dates
metout <- cbind(dates, metout)
soil <- cbind(dates, soil)
shadmet <- cbind(dates, shadmet)
shadsoil <- cbind(dates, shadsoil)
# run the ectotherm model
ecto <- ectotherm(T_F_min = 30, T_F_max = 35, T_pref = 33, T_B_min = 20, T_RB_min = 10)
# retrieve output
environ <- as.data.frame(ecto$environ) # activity, Tb and environment
enbal <- as.data.frame(ecto$enbal) # energy balance values
masbal <- as.data.frame(ecto$masbal) # mass balance value (note most missing if DEB model not running)
# append dates
environ <- cbind(dates, environ)
masbal <- cbind(dates, masbal)
enbal <- cbind(dates, enbal)
############### plot results ######################
# Hourly Tb (black), activity (orange, 5 = bask, 10 = forage), depth (brown, m) and shade (green, %/10)
with(environ, plot(TC ~ dates, ylab = "", xlab="month of year", col = 'black', xlim = c(-0.25, 12), ylim = c(-20, 40), type = "l", yaxt = 'n'))
with(environ, points(ACT * 2 + 7 ~ dates, type = "p", pch = 16, col = "orange"))
with(environ, points(SHADE / 10 - 6 ~ dates, type = "l", col = "dark green"))
with(environ, points(DEP - 10 ~ dates, type = "l", col = "brown"))
abline(ecto$T_F_min, 0, lty = 2, col = 'blue')
abline(ecto$T_F_max, 0, lty = 2, col = 'red')
ytick<-seq(15, 40, by=5)
axis(side=2, at=ytick, labels = TRUE)
mtext(text = c('A', 'B', 'I'), side = 2, line = 1, at = c(11, 9, 7))
ytick<-seq(-6, 4, by=2)
axis(side=2, at=ytick, labels = FALSE)
mtext(text = seq(0, 100, 20), side = 2, line = 1, at = seq(-6, 4, 2), las = 2)
ytick<-seq(-20, -10, by=2)
axis(side=2, at=ytick, labels = FALSE)
mtext(text = rev(seq(0, 100, 20)), side = 2, line = 1, at = seq(-20, -10, 2), las = 2)
abline(h = -10, lty = 2, col = 'grey')
mtext(text = c('body temperature (°C)', 'activity', 'shade (%)', 'depth (cm)'), side = 2, line = 2.5, at = c(30, 9, 0, -15))
text(-0.2, c(ecto$T_F_max + 1, ecto$T_F_min + 1), c('T_F_max', 'T_F_min'), col = c('red', 'blue'), cex = 0.75)
# seasonal activity plot (dark blue = night, light blue = basking, orange = foraging)
forage <- subset(environ, ACT == 2)
bask <- subset(environ, ACT == 1)
night <- subset(metout, ZEN == 90)
day <- subset(metout, ZEN != 90)
with(night, plot(TIME / 60 ~ DOY, ylab = "Hour of Day", xlab = "Day of Year", pch = 15, cex = 2, col = 'dark blue'))
# nighttime hours
with(forage, points(TIME ~ DOY, pch = 15, cex = 2, col = 'orange')) # foraging Tbs
with(bask, points(TIME ~ DOY, pch = 15, cex = 2, col = 'light blue')) # basking Tbs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.