Skip to content

Commit

Permalink
Add catch for GOTM_WET for SA
Browse files Browse the repository at this point in the history
  • Loading branch information
tadhg-moore committed Sep 12, 2024
1 parent 03bc021 commit 43b992e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/run_and_fit.R
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ run_and_fit <- function(aeme, param, model, vars_sim, path,
depth <- ncdf4::ncvar_get(nc, "lake_level")
} else if (model == "gotm_wet") {
zi <- ncdf4::ncvar_get(nc, "zi")
if (is.null(ncol(this.var))) {
return(return_list[[n]])
}
depth <- zi[nrow(zi), ] - zi[1, ]
depth[depth <= 0] <- 0
}
Expand All @@ -333,7 +336,7 @@ run_and_fit <- function(aeme, param, model, vars_sim, path,
if(length(var_indices[[n]][["depths"]]) == 0 |
length(var_indices[[n]][["time"]]) == 0 |
is.null(ncol(this.var))) {
return(return_list)
return(return_list[[n]])
}

conv.fact <- ifelse(model == "glm_aed",
Expand Down

0 comments on commit 43b992e

Please sign in to comment.