Skip to content

Error in grid$Data[i, , ind.NN.y[k, l], ind.NN.x[k, l]] : incorrect number of dimensions #89

@catorpar

Description

@catorpar

Hello,

I'm trying to conduct a bias correction but I'm getting the following error:

Error in grid$Data[i, , ind.NN.y[k, l], ind.NN.x[k, l]] : incorrect number of dimensions

I used loadeR to upload the observed and GCM datasets, then defined the x, y and newdata variables and run the biasCorrection function as indicated by example, and that's when the error occurs.

`obsdata <- "~/Future Climate Analysis/Observed"
Obs <- loadStationData(dataset = obsdata, var="precip", stationID = NULL)
gcmdata <- "~Future Climate Analysis/GCM"
GCM <- loadStationData(dataset = gcmdata, var="precip", stationID = NULL)
ObsTrain <- subsetGrid(Obs,years = 2006:2010, station.id = "26130570")
GCMTrain <- subsetGrid(GCM,years = 2006:2010, station.id = "cam_44")
GCMTest <- subsetGrid(GCM,years= 2011:2015, station.id = "cam_44")
x <- ObsTrain
y <- GCMTrain
newdata <- GCMTest

biasCorrection(x, y, newdata = newdata, precipitation = TRUE, method = "eqm", window=NULL, wet.threshold = 0.1, join.members = TRUE)
`
Attached you can find the files I'm using to complete the bias correction.

GCM.zip
Observed.zip

Any help will be greatly appreciate it.

Camilo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions