From 6cb86b64df8a52f9c288355f7278636ff21d5de7 Mon Sep 17 00:00:00 2001 From: kellijohnson-NOAA Date: Thu, 19 May 2022 17:50:06 -0700 Subject: [PATCH] Changes upper bounds of logkappa2 using VAST_3.9.0 the upper bound of logkappa2 is reached using the default settings b/c of the small number of mesh points. This commit changes the upper bound to 10 using run_model = FALSE to get the correct map. This trick can be found in https://github.com/James-Thorson-NOAA/VAST/issues/300 which was started by @kellijohnson-NOAA b/c of similar issues when running the model for West Coast species. Former-commit-id: 1c9d08baa2e2077ec0530cea5858564697dfad5a --- sandbox/pcod_delta_gamma.R | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sandbox/pcod_delta_gamma.R b/sandbox/pcod_delta_gamma.R index 5e00a3a..2221a5d 100644 --- a/sandbox/pcod_delta_gamma.R +++ b/sandbox/pcod_delta_gamma.R @@ -67,7 +67,21 @@ fit_vast <- fit_model( b_i = pcod[, "density"], a_i = pcod[, "effort"], input_grid = input_grid, - working_dir = paste0(here("doc", "appendix-VAST"), "/") + working_dir = paste0(here("doc", "appendix-VAST"), "/"), + run_model = FALSE +) +upperbounds <- fit_vast$Upper +upperbounds["logkappa2"] <- 10 +fit_vast <- fit_model( + settings = settings, + Lat_i = pcod[, "lat"], + Lon_i = pcod[, "lon"], + t_i = pcod[, "year"], + b_i = pcod[, "density"], + a_i = pcod[, "effort"], + input_grid = input_grid, + working_dir = paste0(here("doc", "appendix-VAST"), "/"), + upper = upperbounds ) # saveRDS(fit_vast, file = f) # } else {