Commit 663c45ca authored by matbuoro's avatar matbuoro
Browse files

Comments added to tables

parent f00fc9fd
......@@ -50,14 +50,13 @@ Expl_rate <- rbind(Expl_rate,colMeans(Expl_rate))
rownames(Expl_rate) <- c(seq(1994,year,1), "Average")
colnames(Expl_rate) <- c("1SW (%)", "MSW (%)")
write.csv(round(Expl_rate,1), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table7_Scorff_',year,'.csv',sep=""))
#write.csv(round(Expl_rate,1), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table7_Scorff_',year,'.csv',sep=""))
# con <- file("object.csv", open="wt")
# writeLines(paste("# this csv file was created by mycode.R on
# 12/2/2005"), con)
# write.csv( object, con)
# close(con)
con <- file(paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table7_Scorff_',year,'.csv',sep=""), open="wt")
writeLines(paste("# Table 7 - Exploitation rate in the river Scorff - 1994-",year,")",sep=""), con)
write.csv( round(Expl_rate,1), con)
close(con)
......@@ -87,8 +86,13 @@ table[,"MSW"] <- fit$median$e_MSW # spawners MSW
table[,"eggs (million)"] <- fit$median$eggs_tot / 1e6 # depose eggs
table[,"eggs/CL"] <- table[,"eggs (million)"] / CL
write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""))
#write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""))
con <- file(paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""), open="wt")
writeLines(paste("# Table 8 - Index rivers :spawning stock, egg deposition and attainment of CLs -",site," (",year,")
CL = 1.44 (millions)
",sep=""), con)
write.csv( round(table,2), con)
close(con)
##________________________ SCORFF (starting in 1994)
site <- "Scorff"
......@@ -129,8 +133,13 @@ ratio_CL <- eggs_tot / CL_eggs
table[,"eggs (million)"] <- c(rep(NA,10),eggs_tot / 1e6) # depose eggs
table[,"eggs/CL"] <- c(rep(NA,10),ratio_CL)
write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""))
#write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""))
con <- file(paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""), open="wt")
writeLines(paste("# Table 8 - Index rivers :spawning stock, egg deposition and attainment of CLs -",site," (",year,")
CL = 3 eggs/m²
",sep=""), con)
write.csv( round(table,2), con)
close(con)
##_______________________________ OIR (starting in 1984)
......@@ -138,7 +147,7 @@ site <- "Oir"
stade <- "adult"
nyear <- length(seq(1984,year,1))
load("~/Documents/RESEARCH/PROJECTS/ORE/Abundance/Oir/adult/data/data_adult_2016.Rdata") # DATA
load("~/Documents/RESEARCH/PROJECTS/ORE/Abundance/",site,"/",stade,"/data/data_",stade,"_",year,".RData",sep="")) # DATA
load(paste("~/Documents/RESEARCH/PROJECTS/ORE/Abundance/",site,"/",stade,"/results/Results_",stade,"_",year,".RData",sep=""))
......@@ -146,6 +155,7 @@ load(paste("~/Documents/RESEARCH/PROJECTS/ORE/Abundance/",site,"/",stade,"/resul
# retirer les individus non marqués des effectifs estimés n (n - (data$C_MC - data$Cm_MC))
years <- seq(1984, year, 1)
nyear <- length(years)
table <- array(, dim=c(length(years), 4))
colnames(table) <- c("1SW", "MSW", "eggs (million)", "eggs/CL")
rownames(table) <- years
......@@ -156,31 +166,36 @@ table[,"MSW"] <- fit$median$Nesc_MSW # spawners MSW
# Eggs:
mcmc <- fit$sims.matrix
e_1SW.mcmc <- mcmc[,paste("Nesc_1SW[",1:nyear,",2]",sep="")] # female only
e_MSW.mcmc <- mcmc[,paste("Nesc_MSW[",1:nyear,",4]",sep="")] # female only
#S_prod <- colSums(data$S_Sc) # surface de production juveniles accessible aux spawners
#CL_eggs <- S_prod[2:(nyear+1)] * CL
e_1SW.mcmc <- mcmc[,paste("Nesc_1SW[",1:nyear,"]",sep="")] # female only
e_MSW.mcmc <- mcmc[,paste("Nesc_MSW[",1:nyear,"]",sep="")] # female only
fec_1SW = 3485 # fecondité 1SW # A REVOIR avec Fred
fec_MSW = 5569 # fecondite MSW # A REVOIR avec Fred
fec_1SW = 4635 # fecondité 1SW # Prevost 1996
fec_MSW = 7965 # fecondite MSW # prevost 1996
eggs_tot.mcmc = e_1SW.mcmc * fec_1SW + e_MSW.mcmc * fec_MSW
eggs_tot <- apply(eggs_tot.mcmc,2,quantile, probs=0.5) #median
# calculs basés sur la conservation limit des tableaux CIEM!! A REFAIRE à partir des données MAIS
#/!\ chercher les données de surface d eproduction dans les données de juvéniles
#Conservation Limit de taux de depose oeufs
CL = 3 # eggs/m²
S_prod <- rep(26714,length(years)) # surface de production juveniles accessible aux spawners / ajout de 31 pour tenir compte des affluents non proscptés
CL_eggs <- S_prod * CL # /!\ data$S_Sc starts in 1993 instead of 1994
#Conservation Limit de taux de depose oeufs
CL_eggs = 0.12 # issue des tableaux CIEM, A REVOIR!!!
ratio_CL <- (eggs_tot/1e6) / CL_eggs
#CL_eggs = 0.12 # issue des tableaux CIEM, A REVOIR!!!
ratio_CL <- eggs_tot / CL_eggs #* 1e6
table[,"eggs (million)"] <- eggs_tot / 1e6 # depose eggs
table[,"eggs/CL"] <- ratio_CL
write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""))
#write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""))
con <- file(paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""), open="wt")
writeLines(paste("# Table 8 - Index rivers :spawning stock, egg deposition and attainment of CLs -",site," (",year,")
CL = 3 eggs/m²
",sep=""), con)
write.csv( round(table,2), con)
close(con)
......@@ -229,8 +244,11 @@ ratio_CL <- (eggs_tot/1e6) / CL_eggs
table[,"eggs (million)"] <- eggs_tot / 1e6 # depose eggs
table[,"eggs/CL"] <- ratio_CL
write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""))
#write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""))
con <- file(paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table8_',site,"_",year,'.csv',sep=""), open="wt")
writeLines(paste("# Table 8 - Index rivers :spawning stock, egg deposition and attainment of CLs -",site," (",year,")",sep=""), con)
write.csv( round(table,2), con)
close(con)
......@@ -271,8 +289,16 @@ table[y,3] <- n_1SW[y+2] + n_MSW[y+3] # Parr 0+ become 1SW 2 years later / MSW 3
## SURVIVAL
table[,4] <- (table[,3] / table[,2])*100
write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""), row.names = FALSE)
#write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""))
con <- file(paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""), open="wt")
writeLines(paste("# Table 9 - juvenile and adult salmon numbers (estim.) in-river return rate in the monitored rivers - ",site," (",year,")
Nota : juvenile fish are smolts except in r. Nivelle (parrs O+; cohort parr 0+ = smolt.years -1).
Adult numbers refer to the smolt year N: runs of N+1 and N+2
These are estimated trap-return numbers of wild fish except in 94-95 years in Nivelle when some stocked fish returned.
Stocking is considered to adjust numbers"
,sep=""), con)
write.csv( round(table,2), con)
close(con)
##________________________OIR (starting in 1984)
......@@ -303,8 +329,16 @@ for (y in 1:(nrow(table))){
## SURVIVAL
table[,4] <- (table[,3] / table[,2])*100
write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""), row.names = FALSE)
#write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""))
con <- file(paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""), open="wt")
writeLines(paste("# Table 9 - juvenile and adult salmon numbers (estim.) in-river return rate in the monitored rivers - ",site," (",year,")
Nota : juvenile fish are smolts except in r. Nivelle (parrs O+; cohort parr 0+ = smolt.years -1).
Adult numbers refer to the smolt year N: runs of N+1 and N+2
These are estimated trap-return numbers of wild fish except in 94-95 years in Nivelle when some stocked fish returned.
Stocking is considered to adjust numbers"
,sep=""), con)
write.csv( round(table,2), con)
close(con)
##________________________BRESLE (starting in 1984)
site <- "Bresle"
......@@ -338,8 +372,16 @@ for (y in 1:(nrow(table))){
## SURVIVAL
table[,4] <- (table[,3] / table[,2])*100
write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""), row.names = FALSE)
#write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""))
con <- file(paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""), open="wt")
writeLines(paste("# Table 9 - juvenile and adult salmon numbers (estim.) in-river return rate in the monitored rivers - ",site," (",year,")
Nota : juvenile fish are smolts except in r. Nivelle (parrs O+; cohort parr 0+ = smolt.years -1).
Adult numbers refer to the smolt year N: runs of N+1 and N+2
These are estimated trap-return numbers of wild fish except in 94-95 years in Nivelle when some stocked fish returned.
Stocking is considered to adjust numbers"
,sep=""), con)
write.csv( round(table,2), con)
close(con)
##________________________SCORFF (starting in 1994)
......@@ -373,4 +415,13 @@ for (y in 1:(nrow(table))){
## SURVIVAL
table[,4] <- (table[,3] / table[,2])*100
write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""), row.names = FALSE)
#write.csv(round(table,2), file=paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""))
con <- file(paste('~/Documents/RESEARCH/PROJECTS/ORE/Abundance/CIEM/Table9_',site,"_",year,'.csv',sep=""), open="wt")
writeLines(paste("# Table 9 - juvenile and adult salmon numbers (estim.) in-river return rate in the monitored rivers - ",site," (",year,")
Nota : juvenile fish are smolts except in r. Nivelle (parrs O+; cohort parr 0+ = smolt.years -1).
Adult numbers refer to the smolt year N: runs of N+1 and N+2
These are estimated trap-return numbers of wild fish except in 94-95 years in Nivelle when some stocked fish returned.
Stocking is considered to adjust numbers"
,sep=""), con)
write.csv( round(table,2), con)
close(con)
\ No newline at end of file
# Table 7 - Exploitation rate in the rivers Scorff - 1994-2016)
"","1SW (%)","MSW (%)"
"1994",9,21.3
"1995",9.9,12.5
"1996",13.5,12.6
"1997",7.7,11
"1998",12.5,18.5
"1999",9.7,7.6
"2000",14,23.8
"2001",9.9,15
"2002",4.1,4.3
"1994",7.6,24.1
"1995",9.6,11.5
"1996",13.3,13.9
"1997",7.8,11.1
"1998",12.2,18.5
"1999",9.9,7.7
"2000",13.9,24.4
"2001",9.9,14.3
"2002",4.2,4.8
"2003",0,11.9
"2004",7.7,15.4
"2005",6,20.2
"2006",7.9,30.3
"2007",10.3,12.6
"2008",4.2,16.3
"2004",7.7,14.9
"2005",6,19.8
"2006",7.9,29.1
"2007",10.3,12.4
"2008",4.2,16.1
"2009",1.9,11.3
"2010",7.6,4.5
"2011",7.3,5.5
"2012",9.1,18.4
"2013",4.9,6.8
"2014",8.2,9
"2015",8.7,17.1
"2016",5.4,12.2
"Average",7.8,13.8
"2011",7.2,5.4
"2012",9.2,18.1
"2013",4.8,6.9
"2014",8.2,8.8
"2015",8.6,16.9
"2016",5.3,11.8
"Average",7.7,13.8
# Table 8 - Index rivers :spawning stock, egg deposition and attainment of CLs -Nivelle(2016)
"","1SW","MSW","eggs (million)","eggs/CL"
"1984",67,16,0.26,0.18
"1985",39,28,0.24,0.17
"1986",186,30,0.58,0.4
"1987",74,23,0.31,0.22
"1988",75,13,0.23,0.16
"1989",136,52,0.61,0.42
"1990",225,38,0.81,0.56
"1991",153,54,0.62,0.43
"1992",179,54,0.77,0.53
"1993",415,42,1.35,0.94
"1994",279,42,0.99,0.69
"1995",155,54,0.7,0.49
"1996",141,40,0.64,0.44
"1997",91,12,0.34,0.23
"1984",64,16,0.25,0.17
"1985",37,27,0.23,0.16
"1986",181,29,0.56,0.39
"1987",73,23,0.31,0.22
"1988",76,13,0.23,0.16
"1989",137,52,0.61,0.42
"1990",224,39,0.81,0.56
"1991",155,54,0.63,0.44
"1992",179,54,0.77,0.54
"1993",417,42,1.36,0.94
"1994",275,42,0.98,0.68
"1995",157,54,0.71,0.49
"1996",142,40,0.64,0.45
"1997",91,12,0.34,0.24
"1998",141,12,0.36,0.25
"1999",131,31,0.45,0.31
"2000",139,29,0.44,0.3
"2000",141,29,0.44,0.31
"2001",176,28,0.53,0.37
"2002",380,37,1.07,0.74
"2003",20,59,0.4,0.28
"2004",77,16,0.27,0.19
"2003",20,60,0.41,0.28
"2004",76,16,0.27,0.19
"2005",75,14,0.29,0.2
"2006",33,30,0.25,0.18
"2006",33,30,0.25,0.17
"2007",52,15,0.19,0.13
"2008",55,28,0.32,0.22
"2009",46,19,0.21,0.15
"2009",47,19,0.21,0.15
"2010",137,20,0.37,0.26
"2011",38,43,0.32,0.22
"2012",61,16,0.2,0.14
"2013",81,42,0.41,0.29
"2014",62,46,0.35,0.24
"2012",62,16,0.21,0.14
"2013",82,42,0.41,0.29
"2014",63,46,0.35,0.24
"2015",44,38,0.31,0.21
"2016",53,22,0.21,0.15
"2016",54,23,0.21,0.15
"smolt year","0+ parr","adults","survival rate (%)"
1985,NA,375,NA
1986,1301,226,17.37
1987,7835.5,188,2.4
1988,11664,286,2.45
1989,10952,342,3.12
1990,10377,220,2.12
1991,5625.5,253,4.5
1992,6902.5,521,7.55
1993,4668.5,393,8.42
1994,4613,232,5.03
1995,13567,184,1.36
1996,5668.5,126,2.22
1997,6925,196,2.83
1998,7481,179,2.39
1999,6615.5,173,2.62
2000,9499,225,2.37
2001,10662.5,455,4.27
2002,12190.5,50,0.41
2003,14865.5,103,0.69
2004,6947,119,1.71
2005,4378,64,1.46
2006,9264,93,1
2007,2390,83,3.47
2008,3092,76,2.46
2009,5112,192,3.76
2010,2730.5,60,2.2
2011,6885,104,1.51
2012,4669,129,2.76
2013,15019.5,100,0.67
2014,4501,66,1.47
2015,6749,NA,NA
2016,7744,NA,NA
2017,9459,NA,NA
# Table 9 - juvenile and adult salmon numbers (estim.) in-river return rate in the monitored rivers - Nivelle (2016)
# Nota : juvenile fish are smolts except in r. Nivelle (parrs O+). Adult numbers refer to the smolt year N: runs of N+1 and N+2
# These are estimated trap-return numbers of wild fish except in 94-95 years in Nivelle when some stocked fish returned. Stocking is considered to adjust numbers
"","smolt year","0+ parr","adults","survival rate (%)"
"1984",1985,NA,380,NA
"1985",1986,1319,226,17.13
"1986",1987,8022,187,2.33
"1987",1988,11761,291,2.47
"1988",1989,11033,334,3.03
"1989",1990,10664,221,2.07
"1990",1991,5809.5,254,4.37
"1991",1992,6932,516,7.44
"1992",1993,4901,390,7.96
"1993",1994,4733,231,4.88
"1994",1995,13750,183,1.33
"1995",1996,5889,127,2.16
"1996",1997,7143,196,2.74
"1997",1998,7459.5,179,2.4
"1998",1999,6854,171,2.49
"1999",2000,9873,226,2.29
"2000",2001,10891,455,4.18
"2001",2002,12322.5,50,0.41
"2002",2003,15266,103,0.67
"2003",2004,7083,118,1.67
"2004",2005,4431,64,1.44
"2005",2006,9395,93,0.99
"2006",2007,2488,83,3.34
"2007",2008,3155,76,2.41
"2008",2009,5181,192,3.71
"2009",2010,2784,60,2.16
"2010",2011,7247,104,1.44
"2011",2012,4775,130,2.72
"2012",2013,15332,101,0.66
"2013",2014,4750,67,1.41
"2014",2015,6895,NA,NA
"2015",2016,8255,NA,NA
"2016",2017,10125,NA,NA
Supports Markdown
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