Greetings,
I am currently using the climate4R package to downscale GCMs (precipitation) in the Sub-Saharan region. I loaded the predictors and predictand files. I am using six folds of 5 years each for the folds. I performed the downscaleCV function.
`dir.obs <- "C:/R_workstation/downscaling"
di.obs <- dataInventory(dir.obs)
stationInfo(dir.obs)
y <- loadStationData(dataset = dir.obs,
var="precip",
years = years) %>% binaryGrid(condition = "GE",
threshold = 1.5,
partial = TRUE)
str(y)
y_bin <- binaryGrid(y, condition = "GE", threshold = 1.5)
x <- makeMultiGrid(z, q, t500, t750, slp, tp, skip.temporal.check = TRUE)
Then I got this error which I was not able to find its solution. Thank you.
fold: 1 --> calculating...
Error in aperm.default(array3D, match(c("time", "lat", "lon"), dimNames)) :
'perm' is of wrong length 3 (!= 4)
Greetings, I am currently using the climate4R package to downscale GCMs (precipitation) in the Sub-Saharan region. I loaded the predictors and predictand files. I am using six folds of 5 years each for the folds. I performed the downscaleCV function. `dir.obs <- "C:/R_workstation/downscaling" di.obs <- dataInventory(dir.obs) stationInfo(dir.obs) y <- loadStationData(dataset = dir.obs, var="precip", years = years) %>% binaryGrid(condition = "GE", threshold = 1.5, partial = TRUE) str(y) y_bin <- binaryGrid(y, condition = "GE", threshold = 1.5) x <- makeMultiGrid(z, q, t500, t750, slp, tp, skip.temporal.check = TRUE)
(vars <- getVarNames(x)) met.1 <- list(which.combine = vars, v.exp = .95, rot = FALSE) met1cv.bin <- downscaleCV(x = x, y = y_bin, method = "GLM", family = binomial(link = "logit"), folds = folds, prepareData.args = list(global.vars = NULL, local.predictors = NULL, spatial.predictors = met.1, combined.only = TRUE))`
Then I got this error which I was not able to find its solution. Thank you. fold: 1 --> calculating... Error in aperm.default(array3D, match(c("time", "lat", "lon"), dimNames)) : 'perm' is of wrong length 3 (!= 4)