Add PCICt date format management
Tom Chitso & Katie A. Smith from CEH Friday, March 5, 2021 11:17:28 AM
I am replying on behalf of Katie and I, as I am running the airGR package as part of our ongoing research. The error comes when using
POSIXct
dates with 360-day years.POSIXct
does not accept the 29th and 30th February as dates, so gives them NA values. When I use this withCreateInputsModel
I get the error:
“Error in CreateInputsModel(FUN_MOD = get(paste0("RunModel_", model)), :
'DatesR' must not include duplicated values”
I have tried running CreateInputsModel with PCICt dates (which accepts 360 day years), but this gives the error:
“Error in CreateInputsModel(FUN_MOD = get(paste0("RunModel_", model)), :
'DatesR' must be defined as 'POSIXlt' or 'POSIXct'”
I have run the model successfully using a dummy set of
POSIXct
dates, and then converted back to the original dates at the end of the process. Is this approach acceptable? I have also seen your previous conversation with Katie, but could not quite understand the solution. Do you suggest duplicating the 28th February data to act as in-fill data for the 29th and 30th February?