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: The dataset is not a field encompassing multiple grid-cells #76

Open
tubabucak opened this issue Jul 22, 2020 · 0 comments
Open

Comments

@tubabucak
Copy link

tubabucak commented Jul 22, 2020

Dear all,

I tried to reproduce the Prudence example with my own data and for beginning I started with only one station (and one grid). As far I understand from help documentation, it is also possible to work with single grid cell.
After running downscaleCV it gives:

fold: 1 --> calculating...
Error: The dataset is not a field encompassing multiple grid-cells

What could be the reason? I have also attached my station data. Any help is appreciated.

meteo.zip

library(climate4R.UDG)
library(climate4R.value)
climate4R.UDG::loginUDG(username = "XXXX", password = "XXXX")

vars <- c("psl","tas","ta@500","ta@700", "ta@850",
"hus@500","hus@850","z@500")

lon <- c(31,33)
names(lon)<- c(min,max)
lat <- c(37,39)
names(lat)<- c(min,max)

grid.list5 <- lapply(vars, function(x) {
loadGridData(dataset = "ECMWF_ERA-Interim-ESD",
var = x,
lonLim = lon,
latLim = lat,
years = 1979:2008)
}
)

x5 <- makeMultiGrid(grid.list5)

bey <- file.path("XXXXXXXXXX")

y1 <- loadStationData(dataset = bey, var = "precip",
lonLim = 31.2, latLim = 37.5,
years = 1979:2008)

y_bin <- binaryGrid(y1, condition = "GE", threshold = 1)

folds <- list(1979:1984, 1985:1990, 1991:1996,
1997:2002, 2003:2008)

spatial.pars.M1 <- list(which.combine = vars,
v.exp = .95,
rot = [FALSE)]

M1cv.bin <- downscaleCV(x = x5, y = y_bin, method = "GLM",
family = binomial(link = "logit"),
folds = folds,
prepareData.args = list(global.vars = NULL,
local.predictors = NULL,
spatial.predictors = spatial.pars.M1,
combined.only = TRUE))

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