rwildermuth / omNEUS

Code to calibrate Atlantis NEUS as an operating model for Ch 4 MSE
0 stars 1 forks source link

Trouble pulling Georges Bank-specific biomass pool catch #2

Open rwildermuth opened 3 years ago

rwildermuth commented 3 years ago

Hi @gavinfay and @sgaichas,

I'm trying to get a catch history for invertebrate/shellfish groups (BFS, BML, PWN) proportional to the catch in the Georges Bank boxes and process them similar to how catch is pulled and scaled for vertebrate catches. I can't use the atlantisom functions because they drop the biomass pools in any pulls (except numbers). I've tried getting the group-specific catches from the CATCH.nc file, but the time series all show zeros. The catch summary table Catch.txt does show catches of these groups though. Am I missing something, or are the catches of these targeted groups reported somewhere other than the CATCH.nc file?

Below is code I use to pull the relevant (I think) columns from the CATCH.nc file: `# 1. Pull catches for entire system and convert to biomass catchConnect <- tidync(file.path(dir, paste0(scenario, "CATCH.nc"))) catchVars <- catchConnect %>% activate("D1,D0") %>% hyper_vars() # %>% select(name) catchVars <- catchVars$name

search <- character() for(i in paste(indBDNLookup[indBDNLookup$BNindexGroup == "inverts", "Code"], "Catch", sep = "_")){ search <- c(search, grep(i, catchVars$name, fixed = TRUE, value = TRUE)) }

sfCatchNC <- catchConnect %>% activate("D1,D0") %>% hyper_tibble()

sfCatchNC <- sfCatchNC %>% select(b, t, numlayers, topk, all_of(search)) ` This code is in GetAtlantisPseudoData.Rmd

Thank you, Robert

gavinfay commented 3 years ago

totcatch.nc should have the catch by box by group.