-
Notifications
You must be signed in to change notification settings - Fork 59
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 grid$Data[i, , ind.NN.y[k, l], ind.NN.x[k, l]] : incorrect number of dimensions #89
Comments
If you want to use biasCorrection, you must use aggr.d or aggr.m, this is a bug. |
For me, the version that doesn't give the error when using locations is downscaleR-3.3.2. So you can install it locally until the bug is fixed |
We have included a step in biasCorrection to ensure the correspondence of dates between observed and simulated data in the training period. However, this new implementation (in the transformeR package) was not adapted to single station data in its first version... it is now, in the development version of transformeR. You can install this version as follows:
|
Yes it works now !!! example
s<-strsplit(as.character(d), "-")
Thank you very much for your efforts |
Thanks durutti, good point. Line 8 has been updated in the devel branch following your suggestion. Now the function works with date class objects too. |
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
The text was updated successfully, but these errors were encountered: