-
Notifications
You must be signed in to change notification settings - Fork 59
Working with a moving window (introducing seasonality)
miturbide edited this page Jun 12, 2018
·
18 revisions
By default, the whole train period as defined by the user is considered to calibrate the methods. It is also interesting to correct each day (or group of days) of the year (doy) independently by using a moving window centered on each doy to calibrate the correction. Therefore, instead of having one correction function for the whole period, there would be one correction for each doy. The user can specify the length (in days) of the calibration moving window and the target days (doy) by means of the argument window
.
# precipitation
data(VALUE_Iberia_pr)
y <- VALUE_Iberia_pr
data(NCEP_Iberia_pr)
x <- gridArithmetics(NCEP_Iberia_pr, 86400, operator = "*")
# NO window
cal <- biasCorrection(y = y, x = x,
precipitation = TRUE,
method = "eqm",
wet.threshold = 0.1)
# Window: calibration window of 30 days to correct each 15 day time step
cal.win <- biasCorrection(y = y, x = x,
precipitation = TRUE,
method = "eqm",
window = c(30, 15),
wet.threshold = 0.1)
# precipitation
quickDiagnostics(y, x, cal, type = "daily", location = c(-2.0392, 43.3075))
# precipitation
quickDiagnostics(y, x, cal.win, type = "daily", location = c(-2.0392, 43.3075))
# time series plotting for Igueldo station
Igueldo.cal <- subsetGrid(cal, station.id = "000234")
Igueldo.cal.win <- subsetGrid(cal.win, station.id = "000234")
Ig.coords <- getCoordinates(Igueldo.cal)
temporalPlot(Igueldo.cal, Igueldo.cal.win, cols = c("blue", "green"), x.axis = "index")
print(sessionInfo())
downscaleR - Santander MetGroup (Univ. Cantabria - CSIC)