Commit fdbf0c50 authored by Poulet Camille's avatar Poulet Camille
Browse files

Included a populate process according to basin surface

parent 01d34a36
...@@ -247,14 +247,14 @@ ...@@ -247,14 +247,14 @@
<temporisation>0</temporisation> <temporisation>0</temporisation>
</species.PlopProcess> </species.PlopProcess>
<species.PopulateBasinNetworkSeveralTimes> <species.PopulateBasinNetworkSeveralTimesAccordingToBasinSize>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode> <synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<nbSIPerBasin>200</nbSIPerBasin>
<nbFishPerSI>2500</nbFishPerSI> <nbFishPerSI>2500</nbFishPerSI>
<initialLength>20.0</initialLength> <initialLength>2.0</initialLength>
<etaPopulate>40.0</etaPopulate>
<timesOfPopulate>5</timesOfPopulate> <timesOfPopulate>5</timesOfPopulate>
<populateSeason>SPRING</populateSeason> <populateSeason>SPRING</populateSeason>
</species.PopulateBasinNetworkSeveralTimes> </species.PopulateBasinNetworkSeveralTimesAccordingToBasinSize>
<species.Age> <species.Age>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode> <synchronisationMode>ASYNCHRONOUS</synchronisationMode>
...@@ -291,11 +291,11 @@ ...@@ -291,11 +291,11 @@
<species.Survive> <species.Survive>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode> <synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<tempMinSurvivalSpawnerInRiv>9.0</tempMinSurvivalSpawnerInRiv> <tempMinSurvivalSpawnerInRiv>9.4</tempMinSurvivalSpawnerInRiv>
<tempMaxSurvivalSpawnerInRiv>23.0</tempMaxSurvivalSpawnerInRiv> <tempMaxSurvivalSpawnerInRiv>23.0</tempMaxSurvivalSpawnerInRiv>
<!-- <tempOptSurvivalSpawnerInRiv>20.0</tempOptSurvivalSpawnerInRiv> --> <tempOptSurvivalSpawnerInRiv>20.0</tempOptSurvivalSpawnerInRiv>
<survivalProbOptSpawnerInRiv>1.0</survivalProbOptSpawnerInRiv> <survivalProbOptSpawnerInRiv>1.0</survivalProbOptSpawnerInRiv>
<mortalityRateInRiver>0.4</mortalityRateInRiver> <!--<mortalityRateInRiver>0.4</mortalityRateInRiver> -->
<mortalityRateInSea>0.4</mortalityRateInSea> <mortalityRateInSea>0.4</mortalityRateInSea>
<mortalityRateInOffshore>0.4</mortalityRateInOffshore> <mortalityRateInOffshore>0.4</mortalityRateInOffshore>
</species.Survive> </species.Survive>
...@@ -316,9 +316,9 @@ ...@@ -316,9 +316,9 @@
<species.ReproduceAndSurviveAfterReproductionWithDiagnose> <species.ReproduceAndSurviveAfterReproductionWithDiagnose>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode> <synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<reproductionSeason>SPRING</reproductionSeason> <reproductionSeason>SPRING</reproductionSeason>
<tempMinRep>9.8</tempMinRep> <tempMinRep>9.4</tempMinRep>
<tempMaxRep>26.0</tempMaxRep> <tempMaxRep>23.0</tempMaxRep>
<tempOptRep>20.0</tempOptRep> <tempOptRep>16.5</tempOptRep>
<eta>2.4</eta> <eta>2.4</eta>
<ratioS95__S50>1.9</ratioS95__S50> <ratioS95__S50>1.9</ratioS95__S50>
<a>135000.0</a> <a>135000.0</a>
......
...@@ -51,20 +51,20 @@ cj= 4.1e-4 / (84810*.5356) ...@@ -51,20 +51,20 @@ cj= 4.1e-4 / (84810*.5356)
# temperature effect on growth # temperature effect on growth
# ------------------------------------------------ # ------------------------------------------------
temperatureEffect= function(temp, Tmin, Topt, Tmax){ temperatureEffect= function(temp, Tmin, Topt, Tmax){
# if (temp<=Tmin | temp >= Tmax) # if (temp<=Tmin | temp >= Tmax)
# return(0) # return(0)
# else # else
response=(temp-Tmin)*(temp-Tmax)/((temp-Tmin)*(temp-Tmax)-(temp-Topt)^2) response=(temp-Tmin)*(temp-Tmax)/((temp-Tmin)*(temp-Tmax)-(temp-Topt)^2)
response[temp<=Tmin | temp >= Tmax] = 0 response[temp<=Tmin | temp >= Tmax] = 0
return(response) return(response)
} }
temperature=seq(8,30,.1) temperature=seq(8,30,.1)
# temperature effect on spawner survival # temperature effect on spawner survival (Survival Process in GR3D)
plot(temperature, temperatureEffect(temperature, 10, 20, 23), type='l') plot(temperature, temperatureEffect(temperature, 10, 20, 23), type='l')
# temperature effect on recruit survival # temperature effect on recruit survival (Reproduction process in GR3D, that is computed from the survival curve of juveniles (Jatteau et al, 2017) )
lines(temperature, temperatureEffect(temperature, 9.75, 20, 26), , col='red') lines(temperature, temperatureEffect(temperature, 9.75, 20, 26), col='red')
lines(temperature, temperatureEffect(temperature, 9.75, 20, 26) * temperatureEffect(temperature, 10, 20, 23), type='l', col='green') lines(temperature, temperatureEffect(temperature, 9.75, 20, 26) * temperatureEffect(temperature, 10, 20, 23), type='l', col='green')
...@@ -116,7 +116,7 @@ abline(h=40) ...@@ -116,7 +116,7 @@ abline(h=40)
for (i in 1:100) { for (i in 1:100) {
lines(age, vonBertalaffyIncrement(6/.25, 2, 60, 0.3900707, .25, .2, withTempEffect = TRUE), col='green') lines(age, vonBertalaffyIncrement(6/.25, 2, 60, 0.3900707, .25, .2, withTempEffect = TRUE), col='green')
} }
lines(age, vonBertalaffyGrowth(age, 2, 60, 0.3900707*mean(temperatureEffect(Tref, 3, 17, 26))), lty=2, lwd = 2) lines(age, vonBertalaffyGrowth(age, 2, 60, 0.3900707*mean(temperatureEffect(Tref, 3, 17, 26))), lty=2, lwd = 2)
abline(h=40) abline(h=40)
...@@ -181,8 +181,6 @@ tapply(simGaronne$length[sel], simGaronne[sel,c('year')],quantile, na.rm = TRUE, ...@@ -181,8 +181,6 @@ tapply(simGaronne$length[sel], simGaronne[sel,c('year')],quantile, na.rm = TRUE,
sel = (dataBruch$LOT =='Tuilières' | dataBruch$LOT =='Golfech') & !is.na(dataBruch$`M.gonades.(g)`) & dataBruch$Sexe =='F' sel = (dataBruch$LOT =='Tuilières' | dataBruch$LOT =='Golfech') & !is.na(dataBruch$`M.gonades.(g)`) & dataBruch$Sexe =='F'
mean(dataBruch$`M.gonades.(g)`[sel]/dataBruch$`M.tot.(g)`[sel]) mean(dataBruch$`M.gonades.(g)`[sel]/dataBruch$`M.tot.(g)`[sel])
sel = (dataBruch$LOT =='Tuilières' | dataBruch$LOT =='Golfech') & dataBruch$Sexe =='F' sel = (dataBruch$LOT =='Tuilières' | dataBruch$LOT =='Golfech') & dataBruch$Sexe =='F'
sum(sel) sum(sel)
Wpre = mean(dataBruch$`M.tot.(g)`[sel]) Wpre = mean(dataBruch$`M.tot.(g)`[sel])
...@@ -192,3 +190,158 @@ sel = (! (dataBruch$LOT =='Tuilières' | dataBruch$LOT =='Golfech')) & dataBruch ...@@ -192,3 +190,158 @@ sel = (! (dataBruch$LOT =='Tuilières' | dataBruch$LOT =='Golfech')) & dataBruch
Wpost= mean(dataBruch$`M.tot.(g)`[sel]) Wpost= mean(dataBruch$`M.tot.(g)`[sel])
WgonadSpent =mean(dataBruch$`M.gonades.(g)`[sel], na.rm = TRUE) WgonadSpent =mean(dataBruch$`M.gonades.(g)`[sel], na.rm = TRUE)
(Wloss=(Wpre - Wpost)/Wpre) (Wloss=(Wpre - Wpost)/Wpre)
# ===================================================================
# Exploration of Stock recruitement-relationship for GR3D calibration
# =====================================================================
#Use to improve the likelihood between observations and GR3D outputs in terms of abudances and North limit colonization.
#a = fcondit de l'espce, a = 135000
#S = quantit de gniteurs: ici on veut la quantit R0 produite par 1000 gniteurs en fonction de la T
#Ratio = 0.2
#n= paramtre simulant l'effet Allee
#-----------On cherche a reproduire la relation SR telle que modlise dans GR3D--------------
temperatureEffect= function(tempWater, TminRep, ToptRep, TmaxRep){
# if (tempWater<=TminRep | tempWater >= TmaxRep)
# return(0)
# else
response=(tempWater-TminRep)*(tempWater-TmaxRep)/((tempWater-TminRep)*(tempWater-TmaxRep)-(tempWater-ToptRep)^2)
response[tempWater<=TminRep | tempWater >= TmaxRep] = 0
return(response)
}
#Relation SR telle qu'elle est modlise dans GR3D
numberOfSpawner<- seq(0:400000)
StockRecruitementRelationship <-function (temp, surfaceWatershed, S) {
lambda = 4.1E-4
deltaTrecruitement = 0.33
survOptRep = 0.0017
n= 2.4
ratioTeta = 1.9
a = 135000
#parametre c de la RS de BH intgrant un effet du BV considr
cj = lambda/surfaceWatershed
#parametre b reprsentant la mortalit densit dpendante de la RS de BH intgrant un effet de la temperature
# bj = (-(1/deltaTrecruitement))*
# log(survOptRep * temperatureEffect(temp, 9.8, 20.0, 26.0))
bj = - log(survOptRep * temperatureEffect(temp, 9.8, 20.0, 26.0)) / deltaTrecruitement
#parametre a (fcondit de l'espce) de la RS de BH intgrant un effet de la temperature
alphaj = (bj * exp(-bj * deltaTrecruitement)) / (cj * (1-exp(-bj * deltaTrecruitement)))
#Bj = paramtre de la relation SR intgrant l'effet de la temprature
betaj = bj/(a*cj*(1-exp(-bj*deltaTrecruitement)))
#p = proportion de gniteurs participant la reproduction en focntion de la quantit de gniteur total
#p = 1/(1+exp(-log(19)*(S-n)/(Ratio*surfaceWatershed)))
S95 = n * surfaceWatershed
S50 = S95/ratioTeta
p= 1/(1+exp(-log(19)*(S-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
#R0 = aj * S * p
AlleeEffect = 1/ (1+exp(-log(19)*(S -n/ratioTeta*surfaceWatershed)/(n*surfaceWatershed -n/ratioTeta*surfaceWatershed)))
Rj = (alphaj * S * AlleeEffect)/(betaj +S * AlleeEffect)
#Rj = ((aj * S) * p)/(Bj +S * p)
StockRecruitement = as.data.frame(Rj)
return (Rj)
}
StockRecruitement<-StockRecruitementRelationship (18, 84810, numberOfSpawner)
plot(numberOfSpawner, StockRecruitement,type = 'l', xlab= "Number of spawners", ylab = "Number of recruits")
#-----------On cherche dterminer le numbre de juvniles gnrs par S = 100000 gniteurs en fonction de la T --------------
temperature <- seq (8,30,.1)
numberOfSpawner=100000
StockRecruitementRelationship <-function (temp, surfaceWatershed, S) {
lambda = 4.1E-4
deltaTrecruitement = 0.33
survOptRep = 0.0017
n= 2.4
ratioTeta = 1.9
a = 135000
#parametre c de la RS de BH intgrant un effet du BV considr
cj = lambda/surfaceWatershed
#parametre b reprsentant la mortalit densit dpendante de la RS de BH intgrant un effet de la temperature
# bj = (-(1/deltaTrecruitement))*
# log(survOptRep * temperatureEffect(temp, 9.8, 20.0, 26.0))
bj = - log(survOptRep * temperatureEffect(temp, 9.8, 20.0, 26.0)) / deltaTrecruitement
#parametre a (fcondit de l'espce) de la RS de BH intgrant un effet de la temperature
alphaj = (bj * exp(-bj * deltaTrecruitement)) / (cj * (1-exp(-bj * deltaTrecruitement)))
#Bj = paramtre de la relation SR intgrant l'effet de la temprature
betaj = bj/(a*cj*(1-exp(-bj*deltaTrecruitement)))
#p = proportion de gniteurs participant la reproduction en focntion de la quantit de gniteur total
#p = 1/(1+exp(-log(19)*(S-n)/(Ratio*surfaceWatershed)))
S95 = n * surfaceWatershed
S50 = S95/ratioTeta
p= 1/(1+exp(-log(19)*(S-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
#R0 = aj * S * p
AlleeEffect = 1/ (1+exp(-log(19)*(S -n/ratioTeta*surfaceWatershed)/(n*surfaceWatershed -n/ratioTeta*surfaceWatershed)))
Rj = (alphaj * S * AlleeEffect)/(betaj +S * AlleeEffect)
#Rj = ((aj * S) * p)/(Bj +S * p)
StockRecruitement = as.data.frame(Rj)
return (Rj)
}
plot(temperature, StockRecruitementRelationship (temperature, 84810, numberOfSpawner),
type="l",
xlab =" Temperature (C)",
ylab = "Number Of Recruits")
#-----------On cherche dterminer le numbre de gniteurs survivants en fonction de la T --------------
#Prend en compte Zsea
plot(temperature, StockRecruitementRelationship (temperature, 84810, numberOfSpawner),
type="l",
xlab =" Temperature (C)",
ylab = "Number Of Recruits")
package species;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
import environment.Basin;
import environment.RiverBasin;
import environment.SeaBasin;
import environment.Time;
import environment.Time.Season;
import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess;
import species.DiadromousFish.Gender;
import org.openide.util.lookup.ServiceProvider;
@ServiceProvider(service = AquaNismsGroupProcess.class)
public class PopulateBasinNetworkSeveralTimesAccordingToBasinSize extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGroup> {
private int nbFishPerSI=2500;
private double initialLength =2.;
private double etaPopulate = 40; // parameter linking surface of a basin and S_etoile; Should be superior at eta (eta = 2.4 in ReproduceAndSurviveAfterReproduction).
private int timesOfPopulate = 5;
private Season populateSeason = Season.SPRING;
public static void main(String[] args) { System.out.println((new
XStream(new DomDriver())) .toXML(new PopulateBasinNetworkSeveralTimesAccordingToBasinSize())); }
@Override
public void doProcess(DiadromousFishGroup group) {
if (Time.getNbYearFromBegin(group.getPilot()) <= timesOfPopulate && Time.getSeason(group.getPilot()) == populateSeason){
for (RiverBasin riverBasin : group.getEnvironment().getRiverBasins()){
int numberOfFemaleToPopulate = (int) Math.round(etaPopulate* riverBasin.getAccessibleSurface()) ;
int nbFemaleSI= numberOfFemaleToPopulate/nbFishPerSI ;
int nbMaleSI = nbFemaleSI;
for (int i=0; i < nbFemaleSI; i++){
group.addAquaNism(new DiadromousFish(group.getPilot(), riverBasin, initialLength, nbFishPerSI, Gender.FEMALE));
}
for (int i=0; i < nbMaleSI; i++){
group.addAquaNism(new DiadromousFish(group.getPilot(), riverBasin, initialLength, nbFishPerSI, Gender.MALE));
}
}
}
System.out.println("fem: "+ group. getFemaleSpawnerEffective()+ " \tmal"+group.getMaleSpawnerEffective());
}
}
...@@ -176,6 +176,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -176,6 +176,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
amountPerSuperIndividual = alpha / maxNumberOfSuperIndividualPerReproduction; amountPerSuperIndividual = alpha / maxNumberOfSuperIndividualPerReproduction;
// Compute the Allee effect parameters S95 and S50 // Compute the Allee effect parameters S95 and S50
S95 = eta * riverBasin.getAccessibleSurface(); // corresponds to S* in the rougier publication S95 = eta * riverBasin.getAccessibleSurface(); // corresponds to S* in the rougier publication
S50 = S95 / ratioS95_S50; S50 = S95 / ratioS95_S50;
...@@ -395,7 +396,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG ...@@ -395,7 +396,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
riverBasin.getSpawnersForFirstTimeMeanLengths(Gender.FEMALE).push(femaleSpawnersForFirstTimeLengthsSum / numberOfFemaleSpawnerForFirstTime); riverBasin.getSpawnersForFirstTimeMeanLengths(Gender.FEMALE).push(femaleSpawnersForFirstTimeLengthsSum / numberOfFemaleSpawnerForFirstTime);
} }
else { else {
riverBasin.getSpawnersForFirstTimeMeanAges(Gender.FEMALE).push(0.); riverBasin.getSpawnersForFirstTimeMeanAges(Gender.MALE).push(0.);
riverBasin.getSpawnersForFirstTimeMeanLengths(Gender.MALE).push(0.); riverBasin.getSpawnersForFirstTimeMeanLengths(Gender.MALE).push(0.);
} }
if (numberOfMaleSpawnerForFirstTime>0) { if (numberOfMaleSpawnerForFirstTime>0) {
......
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