Skip to content

Commit

Permalink
Updated bycatch text and pm24.R
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim.Ianelli authored and Jim.Ianelli committed Nov 26, 2024
1 parent 31e7ef8 commit 7dfe297
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
4 changes: 2 additions & 2 deletions 2024/runs/fixsel_bts/pm.prj
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ EBS_Pollock_2024
# selectivity
0.000181488 0.0583427 0.214017 0.519824 0.961364 1.05539 1.21717 1.61394 1.48198 1.36844 1.34579 1.29089 1.29089 1.29089 1.29089
# natage
29377.7 7566.64 4424.96 2239.68 1188.1 1222.5 2491.5 352.087 104.913 56.7207 66.3959 59.5054 23.0356 5.62418 15.784
29377.7 7566.63 4424.96 2239.68 1188.1 1222.5 2491.5 352.088 104.913 56.7208 66.396 59.5054 23.0355 5.62417 15.7839
# Nrec
46
# rec
22984.9 57379.6 28788.1 34715 17584.1 51766.1 15329 35913.3 13342.3 7762.49 5528.46 11541.2 48025.1 23391.7 18959.2 39063.3 13731.8 10043.2 21546.4 29936.1 14868.3 16092.7 24498.1 33831.7 22697.3 14746.4 6773.38 4746.48 12066.6 25746.3 13475 49761.6 23374.9 14161.9 12013.6 42351.6 46782.3 19486.4 6935.84 6611.14 12991.8 65502.3 17634 10318.8 12351.6 17245.1 18611.7
22984.9 57379.6 28788.1 34714.9 17584.1 51766.1 15329 35913.3 13342.3 7762.49 5528.46 11541.2 48025.1 23391.7 18959.2 39063.3 13731.8 10043.2 21546.4 29936.1 14868.3 16092.7 24498.1 33831.7 22697.3 14746.4 6773.38 4746.48 12066.6 25746.3 13475 49761.6 23374.9 14161.9 12013.6 42351.6 46782.3 19486.4 6935.85 6611.14 12991.8 65502.3 17634 10318.8 12351.6 17245.1 18611.7
# SpawningBiomass
1122.96 990.621 887.765 1015.69 1571.86 2247.75 3121.15 3297.53 3840.69 3797.41 3918.96 3780.11 3323.83 2847.22 2299.74 2138.5 2699.93 3006.85 3066.83 2903.41 2757.96 2331.08 2496.47 2478.59 2586.65 2459.34 2544.75 2863.39 2535.16 2337.55 1942.57 1512.81 1631.22 1681.31 2063.13 2507.15 2855.02 2806.27 2594.98 2797.64 3158.47 2936.94 2763.18 2026.16 2048.03 2713.04 2591.63
6 changes: 3 additions & 3 deletions 2024/runs/fixsel_bts/pmsr.prj
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ EBS_Pollock
# selectivity
0.000181488 0.0583427 0.214017 0.519824 0.961364 1.05539 1.21717 1.61394 1.48198 1.36844 1.34579 1.29089 1.29089 1.29089 1.29089
# natage
18611.7 7011.07 3171.64 1871.73 2112.24 4280.96 602.805 191.223 103.296 120.844 108.297 42.0465 10.2657 8.52994 20.2803
18611.7 7011.07 3171.63 1871.73 2112.24 4280.96 602.805 191.223 103.296 120.844 108.297 42.0465 10.2657 8.52994 20.2803
# natage
18611.7 7011.07 3171.64 1871.73 2112.24 4280.96 602.805 191.223 103.296 120.844 108.297 42.0465 10.2657 8.52994 20.2803
18611.7 7011.07 3171.63 1871.73 2112.24 4280.96 602.805 191.223 103.296 120.844 108.297 42.0465 10.2657 8.52994 20.2803
# Nrec
47
# rec
22984.9 57379.6 28788.1 34715 17584.1 51766.1 15329 35913.3 13342.3 7762.49 5528.46 11541.2 48025.1 23391.7 18959.2 39063.3 13731.8 10043.2 21546.4 29936.1 14868.3 16092.7 24498.1 33831.7 22697.3 14746.4 6773.38 4746.48 12066.6 25746.3 13475 49761.6 23374.9 14161.9 12013.6 42351.6 46782.3 19486.4 6935.84 6611.14 12991.8 65502.3 17634 10318.8 12351.6 17245.1 18611.7
22984.9 57379.6 28788.1 34714.9 17584.1 51766.1 15329 35913.3 13342.3 7762.49 5528.46 11541.2 48025.1 23391.7 18959.2 39063.3 13731.8 10043.2 21546.4 29936.1 14868.3 16092.7 24498.1 33831.7 22697.3 14746.4 6773.38 4746.48 12066.6 25746.3 13475 49761.6 23374.9 14161.9 12013.6 42351.6 46782.3 19486.4 6935.85 6611.14 12991.8 65502.3 17634 10318.8 12351.6 17245.1 18611.7
# SpawningBiomass
1122.96 990.621 887.765 1015.69 1571.86 2247.75 3121.15 3297.53 3840.69 3797.41 3918.96 3780.11 3323.83 2847.22 2299.74 2138.5 2699.93 3006.85 3066.83 2903.41 2757.96 2331.08 2496.47 2478.59 2586.65 2459.34 2544.75 2863.39 2535.16 2337.55 1942.57 1512.81 1631.22 1681.31 2063.13 2507.15 2855.02 2806.27 2594.98 2797.64 3158.47 2936.94 2763.18 2026.16 2048.03 2713.04 2591.63
16 changes: 8 additions & 8 deletions 2024/runs/fixsel_bts/proj_df.csv
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Scenario, Year, SSB, Catch, R, SER
1,2025,2280.29,1300,29377.7,0.179024
1,2026,2133.74,1206.34,28568.6,0.168083
1,2027,2199.72,1165.63,28014.4,0.146121
1,2028,2492.75,1255.87,28278,0.140715
1,2029,2772.53,1415.23,29180.2,0.146861
1,2025,2427.57,10,29377.7,0.00138857
1,2026,2765.47,11.6543,29015.4,0.00142926
1,2027,3221.61,12.9589,29670.5,0.00132761
1,2028,3842.79,14.8878,29875.7,0.00129652
1,2029,4463.77,17.4947,29219.5,0.00135099
2,2025,2393.95,325,29377.7,0.0450444
2,2026,2605.91,359.283,28922.7,0.0453915
2,2027,2938.92,385.087,29421.4,0.0414827
Expand All @@ -12,7 +12,7 @@ Scenario, Year, SSB, Catch, R, SER
3,2025,2357.78,650,29377.7,0.0899065
3,2026,2444.8,679.202,28816.9,0.0885654
3,2027,2670.54,701.858,29060.9,0.0795808
3,2028,3084.08,775.462,29534.7,0.0768643
3,2028,3084.08,775.461,29534.7,0.0768643
3,2029,3492.08,888.204,29885.4,0.0798408
4,2025,2319.95,975,29377.7,0.134572
4,2026,2287.37,961.085,28699.4,0.129476
Expand All @@ -27,15 +27,15 @@ Scenario, Year, SSB, Catch, R, SER
6,2025,2238.61,1625,29377.7,0.223244
6,2026,1984.03,1416.45,28422.5,0.204349
6,2027,1994.67,1328.8,27325.5,0.174943
6,2028,2250.99,1422.02,27378.8,0.168925
6,2028,2250.99,1422.02,27378.7,0.168925
6,2029,2484.98,1592.84,28466.8,0.177227
7,2025,2194.66,1950,29377.7,0.26721
7,2026,1838.37,1593.01,28258.7,0.238249
7,2027,1808.1,1455.99,26525.9,0.201148
7,2028,2038.59,1553.38,26342.7,0.195362
7,2029,2233.52,1730,27591.6,0.206334
8,2025,2098.83,2600,29377.7,0.354274
8,2026,1559.83,1852.39,27865.2,0.298914
8,2026,1559.83,1852.39,27865.2,0.298915
8,2027,1484.98,1628.27,24602.3,0.247078
8,2028,1684.71,1743.02,23988.7,0.245074
8,2029,1811.37,1912.91,25532.3,0.262863
6 changes: 3 additions & 3 deletions R/pm24.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dec_tab_ord <<- 1:8
#)
mod_names <- c(
"Last year", # 1
"Model 23","Drop new BTS", "and ATS", "and AVO" , "Fix BTS Sel.")
"Model 23","Drop new BTS", "and ATS", "and AVO" )#, "Fix BTS Sel.")
# BTS age compositions included through 2023
# "Sept version",
# "2023 AVO point",
Expand All @@ -46,7 +46,7 @@ mod_names <- c(
# but with Hulsons BTS input sample sizes

mod_dir <- c("lastyr",
"m23","m1", "m2", "m3", "fixsel_bts")
"m23","m1", "m2", "m3")#, "fixsel_bts")
# mod_names <- c("MSY=1.2","Fmsy=F35%", "Base est.")
# mod_dir <- c("condmn", "condF35", "m8")
# WARNING, commented out line will re-run all the models in the mod_dir directories within "runs"
Expand All @@ -58,7 +58,7 @@ mod_dir <- c("lastyr",
modlst <- get_results(rundir = "2024/runs")
# names(modlst)
M <<- modlst[[thismod]]
Fix <<- modlst[[6]]
#Fix <<- modlst[[6]]
#M <<- modlst[[3]];saveRDS(M, "~/m8.rds")

#.MODELDIR <<- paste0("2023_runs/", mod_dir, "/")
Expand Down
13 changes: 7 additions & 6 deletions ebswp.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4058,7 +4058,8 @@ print(tab,
#| output: asis
#| echo: false
# byc <- read_csv("../data/fishery/pollock_catch.csv")[,c(1,16,19,22,27,28)]
if (do_plot) {
# do_bycatch_data <- FALSE
if (FALSE) {
byc <- read.csv("doc/data/pollock_catch.csv")[, c(1, 6, 9, 4, 10, 11)]
names(byc) <- c("Year", "target", "gear", "NMFS_area", "Catch", "wed")
Expand Down Expand Up @@ -4089,23 +4090,23 @@ if (do_plot) {
group_by(Year, target) %>%
summarise(Catch = sum(Catch), .groups = "drop")
byc <- byc %>% pivot_wider(names_from = target, values_from = Catch)
byc$Total=rowSums(byc[,2:6],na.rm=TRUE)
byc <- data.frame(byc)
write_csv(byc, "doc/data/bycatch.csv")
}
byc <- read_csv("doc/data/bycatch.csv")
byc$Total=rowSums(byc[,2:6],na.rm=TRUE)
# byc <- read.csv("data/byc_of_pollock.csv",header=T)
for (i in 2:length(byc[1, ])) {
byc[, i] <- formatC(byc[, i], format = "d", digits = 0, big.mark = ",")
}
cap <- tabcap[38]
lab <- tablab[38]
tab <- xtable::xtable(byc, caption = cap, label = paste0("tbl:", tablab[38]), digits = 0, auto = TRUE, align = rep("r", (length(byc[1, ]) + 1)))
tab <- xtable::xtable(byc, caption = cap, label = paste0("tbl:", tablab[38]), digits = 0,
auto = TRUE, align = rep("r", (length(byc[1, ]) + 1)))
print(tab,
caption.placement = "top", include.rownames = FALSE, rotate.colnames = FALSE, sanitize.text.function = function(x) {
x
},
caption.placement = "top", include.rownames = FALSE, rotate.colnames = FALSE,
sanitize.text.function = function(x) { x },
scalebox = .90, format.args = list(decimal.mark = "."), comment = FALSE
)
```
Expand Down

0 comments on commit 7dfe297

Please sign in to comment.