Commit 69e0ca7d authored by Poulet Camille's avatar Poulet Camille
Browse files

Upload file for sourcing

parent 60c957cd
library(XML)
#read the XML file to upload the set of parameters included in GR3D-US
fishXML <- xmlToList(xmlParse("../../data/input/northeastamerica/fishRIOBasin_Sapidissima.xml"))
......
......@@ -2,6 +2,8 @@
#Read and upload environmental data
#-------------------------------------
library(readr)
#---------Temperature ----------------
#temperature in river basins
tempInriver <- read_csv("../../data/input/northeastamerica/observed_river_temperatures.csv")
......@@ -13,7 +15,7 @@ tempInOffshore <- read_csv("../../data/input/northeastamerica/observed_offshore_
#---------Characteristic----------------
#characteristics of the river basins
nea_riverbasin_features <- read_csv("../../data/input/northeastamerica/nea_riverbasins.csv")
nea_riverBasinFeatures <- read_csv("../../data/input/northeastamerica/nea_riverbasins.csv")
#Upload presence and absence in US river basins
nea_presence <- read_csv("../../data/input/northeastamerica/nea_presence.csv")
#upload connections between inshore and offshore basins
......
......@@ -36,6 +36,7 @@ vonBertalanffyInverse = function(L, L0, Linf, K){
return(t0 - log(1 - L/Linf)/K)
}
# von Bertalanffy increment
# pas cohérent avec la temperature effet sur le coeff de croissance mais ca marche
vonBertalanffyIncrement = function(nStep, L0, Linf, K, timeStepDuration, sigma, withTempEffect=FALSE, TrefAtSea = c(9.876946, 13.489854, 15.891487, 11.554104) ){
......@@ -127,23 +128,23 @@ stockRecruitementRelationship <- function(Triver,Tmin, Topt, Tmax, survivalStock
###--------------------- SR relationship -----------------
#parametre c de la RS de BH intgrant un effet du BV considr
#parametre c de la RS de BH int?grant un effet du BV consid?r?
cj = lambda/surfaceWatershed
#parametre b reprsentant la mortalit densit dpendante de la RS de BH intgrant un effet de la temperature
#parametre b repr?sentant la mortalit? densit? d?pendante de la RS de BH int?grant un effet de la temperature
# bj = (-(1/deltaTrecruitement))*
# log(survOptRep * temperatureEffect(temp, 9.8, 20.0, 26.0))
bj = -log(survOptRep * temperatureEffect(Triver, Tmin , Topt , Tmax)) / deltaT
#parametre a (fcondit de l'espce) de la RS de BH intgrant un effet de la temperature
#parametre a (f?condit? de l'esp?ce) de la RS de BH int?grant un effet de la temperature
alphaj = (bj * exp(-bj * deltaT)) / (cj * (1 - exp(-bj * deltaT)))
alphaj[is.na(alphaj)] <- 0
#Bj = paramtre de la relation SR intgrant l'effet de la temprature
#Bj = param?tre de la relation SR int?grant l'effet de la temp?rature
betaj = bj/(alpha*cj*(1 - exp(-bj*deltaT)))
#p = proportion de gniteurs participant la reproduction en focntion de la quantit de gniteur total
#p = proportion de g?niteurs participant ? la reproduction en focntion de la quantit? de g?niteur total
#p = 1/(1+exp(-log(19)*(S-n)/(Ratio*surfaceWatershed)))
S95 = n * surfaceWatershed
......@@ -151,7 +152,7 @@ stockRecruitementRelationship <- function(Triver,Tmin, Topt, Tmax, survivalStock
p = 1/(1 + exp(-log(19)*(survivalStock - S50)/(S95 - S50)))
#relation Stock Recrutement ie calcul le nombre de recrues en fonction du nombre de gniteurs et de la T en intgrant l'effet Allee
#relation Stock Recrutement ie calcul le nombre de recrues en fonction du nombre de g?niteurs et de la T en int?grant l'effet Allee
#R0 = aj * S * p
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment