|
|
# RUN IBASAM
|
|
|
|
|
|
|
|
|
[!code[Main](https://github.com/Ibasam/IBASAM/blob/0a80e276155c90c66fe19db7ad2c315796ad6f08/IBASAM/R/demoIbasam.R#L1-L11)]
|
|
|
|
|
|
IBASAM simulation can be run using default parameters (corresponding to [Scorff river](https://www6.inra.fr/diapfc/Dispositifs/Observatoires-in-natura/Scorff)) with the commands below :
|
|
|
|
|
|
1. Load Ibasam library in R:
|
... | ... | @@ -53,6 +50,13 @@ During simulations, three temporal series of environmental features influenced t |
|
|
|
|
|
[code](https://github.com/Ibasam/IBASAM/blob/0a80e276155c90c66fe19db7ad2c315796ad6f08/IBASAM/R/demoIbasam.R#L22-L24)
|
|
|
|
|
|
1. 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).
|
|
|
|
|
|
2. 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,
|
... | ... | @@ -67,10 +71,10 @@ function (nYears, CC_Temp, CC_Amp, plotting = TRUE, window = FALSE, returning = |
|
|
...
|
|
|
```
|
|
|
|
|
|
> source(demoIbasam.R)
|
|
|
|
|
|
|
|
|
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).
|
|
|
3. Load the modified demoIbasam function:
|
|
|
``` R
|
|
|
source(demoIbasam.R)
|
|
|
```
|
|
|
|
|
|
2. Alternatively, simulations utilize a set of the 3 series generated from stochastic climate models (see [river climate](riverclimate) and [ocean climate](oceanclimate) sections).
|
|
|
|
... | ... | |