I am having problems with the reading functions and the time zones of the example data from The Nith river model (Raven Tutorial #2). Context: I am in Chile (Sys.timezone() = "America/Santiago").
While the hyd.read allows specifying the time zone of the input data, the forcings.read function does not and thus uses the local time zone. In southern hemisphere, the local time is different than the time zone of the example data and the conversion with as.POSIXct generates some NA values for some specific dates/hours. forcings.read.R line 11,12:
Code: Select all
date.time <- as.POSIXct(paste(watersheds$date, watersheds$hour), format = "%Y-%m-%d %H:%M:%S"))
These NA values generate error in forcings.read.R line 46:
Code: Select all
watersheds <- xts(order.by = date.time, x = watersheds)
I am able to avoid the error by editing the body of the forcings.read with trace("forcings.read", edit=TRUE) and manually change the time zone in line 12, but ideally users should be able to change it from the arguments of the function, just as with hyd.read(ff = NA, tzone = "").
Do you think it would be possible to add the tz argument to forcings.read.R function?
Thanks,
Camila