Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in arr[, , , ind, ] <- grid[["Data"]] : number of items to replace is not a multiple of replacement length #107

Open
Violet-issak opened this issue Jan 10, 2024 · 0 comments

Comments

@Violet-issak
Copy link

Hi,

I tried to run it, it runs very good till the final line it gives me this error, I don't have any idea how could I fix it. I hope some one can help me with that.

Error in arr[, , , ind, ] <- grid[["Data"]] :
number of items to replace is not a multiple of replacement length.

The code is as following:

library(downscaleR)
library(climate4R.datasets)

precipitation
data(VALUE_Iberia_pr)
y <- VALUE_Iberia_pr

temperature
data(VALUE_Iberia_tas)
y.t <- VALUE_Iberia_tas

precipitation
data(NCEP_Iberia_pr)
x <- gridArithmetics(NCEP_Iberia_pr, 86400, operator = "*")

temperature
data(NCEP_Iberia_tas)
x.t <- NCEP_Iberia_tas

library(visualizeR)
library(sp)
spatialPlot(climatology(x), backdrop.theme = "coastline",
sp.layout = list(list(SpatialPoints(getCoordinates(y)),
pch = 17, col = "black", cex = 1.5)))

cal <- biasCorrection(y = y, x = x, newdata = x, precipitation = TRUE, method = "delta")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant