SantanderMetGroup / downscaleR

An R package for climate data bias correction and downscaling (part of the climate4R bundle)
https://github.com/SantanderMetGroup/climate4R
GNU General Public License v3.0
103 stars 59 forks source link

Error While biasCorrecting in downscaleR #61

Open Fatemeh-Shabanpour opened 5 years ago

Fatemeh-Shabanpour commented 5 years ago

Dear Climate4R Group, Thank you very much for developing such a helpful package. I have encountered some problem in bias correcting while I want to do it for the whole period. My commands are as follow: "

y <- subsetGrid(observation , years = 1983:2001) x <- subsetGrid(prediction , years = 1983:2001) newdata <- subsetGrid(prediction , years = 2002:2009) cal_1 <- biasCorrection(y = y,x = x, newdata = newdata ,method = "eqm" , precipitation = TRUE) [2019-04-08 13:50:28] Argument precipitation is set as TRUE, please ensure that this matches your data. Error in as.POSIXlt.character(x, tz, ...) : character string is not in a standard unambiguous format " I don't know where the problem com from. When I try to use "window" vector in my command the problem is solved. I am also don't sure about the accurate meaning of window, is it able to use the total number of days(6940 days in my problem) in window vector to bias correct whole period? " exm: cal_1 <- biasCorrection(y = y,x = x, newdata = newdata ,method = "eqm" , precipitation = TRUE , window = 6940) [2019-04-08 13:56:41] Argument precipitation is set as TRUE, please ensure that this matches your data. [2019-04-08 13:56:43] Number of windows considered: 2... [2019-04-08 13:56:43] Bias-correcting 1 members separately... [2019-04-08 13:57:14] Done. " Thank you very much, any help would be very appreciated.

Fatemeh-Shabanpour commented 5 years ago

I fix the problem, when I try to bias correct the forecasts for each season individually and using window equal to the number of days in each month the problem is solved.