Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jcaracappa1 committed Jun 18, 2024
2 parents 6941521 + 3d62280 commit cf8bc88
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
11 changes: 6 additions & 5 deletions R/make_atlantis_diagnostic_figures.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
#'@param plot.diet logical. Plots showing predation of and consumption by each functional group
#'@param plot.consumption Boolean. Plots showing consumption
#'@param plot.spatial.biomass logical. Plots showing the spatial (box/level) structure of groups' biomass
#'@param plot.spatial.catch logical. Plots showing the spatial (box/level) structure of groups' catch
#'@param plot.spatial.biomass.seasonal logical. Plots showing the spatial (box/level) structure of groups' biomass
#'@param plot.catch logical. Plots annual catch(mt) age based catch (numbers) and age based %ages
#'@param plot.max.weight logical. Plots the maximum size of fish in each size class over the domain
#'@param plot.weight logical. Plots the maximum size of fish in each size class over the domain
#'@param plot.mortality logical. Plots Mortality (F, M1, M2) from two output sources (Mort, SpecificMort)
#'
#'@importFrom magrittr "%>%"
Expand Down Expand Up @@ -382,7 +383,7 @@ make_atlantis_diagnostic_figures = function(out.dir,
}

# Max weight by age class
if(plot.max.weight|plot.all){
if(plot.weight|plot.all){
print("max weight")
maxSize <- readRDS(file.path(out.dir,'max_weight.rds'))
ageClasses <- 1:max(maxSize$agecl)
Expand Down Expand Up @@ -1017,7 +1018,7 @@ make_atlantis_diagnostic_figures = function(out.dir,
# This needs to be reworked
if(F & plot.spatial.biomass.seasonal){
#source(here::here('R','plot_biomass_box_summary.R'))
print("spatial biomass")
print("spatial biomass seasonal")
plot_biomass_box_season(bio.box = readRDS(file.path(out.dir,'biomass_box.rds')),
bio.box.invert = readRDS(file.path(out.dir,'biomass_box_invert.rds')),
fig.dir = fig.dir,
Expand All @@ -1027,7 +1028,7 @@ make_atlantis_diagnostic_figures = function(out.dir,
}

if(plot.spatial.catch|plot.all){

print("spatial catch")
bgm = atlantistools::convert_bgm(bgm = param.ls$bgm)

biomass.box = readRDS(file.path(out.dir,'biomass_box.rds'))%>%
Expand All @@ -1044,7 +1045,7 @@ make_atlantis_diagnostic_figures = function(out.dir,
dplyr::left_join(catch)

i=1
pdf(paste0(fig.dir,'spatial_biomass_catch.pdf'))
pdf(paste0(fig.dir,'/spatial_biomass_catch.pdf'))
for(i in 1:nrow(group.index)){

biomass.catch.spp =biomass.catch.box %>%
Expand Down
7 changes: 5 additions & 2 deletions man/make_atlantis_diagnostic_figures.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions man/process_atl_output.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cf8bc88

Please sign in to comment.