Skip to content

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

@Violet-issak

Description

@Violet-issak

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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions