Modify a stars object to change the time dimension to calendar years between specified starting and ending years.
Arguments
- data
A stars object with the data to be modified.
- y_start
A number with the starting year of the data (in calibrated Before Present format).
- y_end
A number with the ending year of the data (in calibrated Before Present format).
- by
A number or string specifying the interval of the dates to be used in the new stars object.
Examples
if (FALSE) { # \dontrun{
data <- read_dsclim("data/dsclim/",
var = "tasmax",
41,
150,
rcp = "rcp2.6",
gcm = "CESM1-CAM5",
calendar_dates = FALSE,
proxy = FALSE)
time_2_calendar_dates(data,
41,
150,
by = "1 month")
} # }