... | ... | @@ -40,57 +40,6 @@ myIbasam(10) |
|
|
```
|
|
|
|
|
|
|
|
|
# INPUT
|
|
|
|
|
|
## Temporal series of environmental conditions
|
|
|
|
|
|
During simulations, three temporal series of environmental features influenced the life of the individuals: the river temperature, the river flow and the marine growth conditions (a variable synthesizing marine environment effects on growth, see [section](oceanclimate)).
|
|
|
|
|
|
1. These series can be observed data. To do so, use the R functions called from the [demoIbasam](IBASAM/IBASAM/R/demoIbasam.R) file:
|
|
|
|
|
|
* Load your data:
|
|
|
``` R
|
|
|
mm <- data.frame(temperatures=your_temp_data, logrelflow=your_flow_data)
|
|
|
```
|
|
|
with *mm* being a data frame containing daily water temperatures (in Celsius) and water flow (log of m^3/s) over the period to be simulated (years*365).
|
|
|
|
|
|
* Comment the [line](https://github.com/Ibasam/IBASAM/blob/0a80e276155c90c66fe19db7ad2c315796ad6f08/IBASAM/R/demoIbasam.R#L7) corresponding to the river_climate_model function (which generates environmental values):
|
|
|
``` R
|
|
|
demoIbasam <-
|
|
|
function (nYears, CC_Temp, CC_Amp, plotting = TRUE, window = FALSE, returning = FALSE,
|
|
|
success = TRUE, empty = TRUE)
|
|
|
{
|
|
|
empty()
|
|
|
def <- defaultParameters()
|
|
|
#mm <- river_climate_model(nYears + 1, CC_Temp, CC_Amp)
|
|
|
Reset_environment()
|
|
|
Prepare_environment_vectors(mm$temperatures, mm$logrelflow)
|
|
|
setup_environment_parameters(def$envParam)
|
|
|
...
|
|
|
```
|
|
|
|
|
|
* Load the modified demoIbasam function:
|
|
|
``` R
|
|
|
source(demoIbasam.R)
|
|
|
```
|
|
|
|
|
|
2. Use observed data for the parameterization of the model (see [section](riverclimate)).
|
|
|
|
|
|
TO DO
|
|
|
* link to files
|
|
|
* script to analyse data and get parameters estimates
|
|
|
|
|
|
Then, simulations utilize a set of the 3 series generated from stochastic climate models (see [river climate](riverclimate) and [ocean climate](oceanclimate) sections).
|
|
|
|
|
|
## Model parameterization
|
|
|
|
|
|
By default, Ibasam use the [default parameters](https://github.com/Ibasam/IBASAM/blob/master/IBASAM/src/defaultParameters.h).
|
|
|
Ibasam load the default parameters using the function [defaultParameters()](
|
|
|
https://github.com/Ibasam/IBASAM/blob/master/IBASAM/R/defaultParameters.R). One can change parameters by modifying values in [defaultParameters.h](https://github.com/Ibasam/IBASAM/blob/master/IBASAM/src/defaultParameters.h) and then compile a new package (see [installation](installation) section), or by modifying [demoIbasam](https://github.com/Ibasam/IBASAM/blob/master/IBASAM/R/demoIbasam.R) function as :
|
|
|
|
|
|
In R:
|
|
|
|
|
|
> source(demoIbasam.R)
|
|
|
|
|
|
## Initialization
|
|
|
|
... | ... | |