Skip to content

Commit

Permalink
minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
miturbide committed Dec 4, 2023
1 parent 34dbb16 commit d99303b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions R/petGrid.R
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ petGrid.th <- function(tas, tasmin, tasmax, k, phc, ...) {
#' @author J Bedia

petGrid.har <- function(tasmin, tasmax, pr = NULL, Ra = NULL, ...) {
add.arg.list <- list(...)
if (is.null(tasmin) || is.null(tasmax)) {
stop("tasmin and tasmax grids are required by Hargreaves method", call. = FALSE)
}
Expand Down
1 change: 1 addition & 0 deletions R/speiGrid.R
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ speiGrid <- function(pr.grid, et0.grid = NULL, scale = 3, params = NULL, return.
})
message("[", Sys.time(), "] Done")
## Recover the grid structure -----------------------
if(return.coefficients) pr.grid <- climatology(pr.grid) %>% suppressMessages
pr.grid$Data <- do.call("abind", c(spei.list, along = -1L)) %>% unname()
if (isTRUE(return.coefficients)) pr.grid <- redim(pr.grid, drop = TRUE)
attr(pr.grid$Data, "dimensions") <- dimNames
Expand Down

0 comments on commit d99303b

Please sign in to comment.