View source: R/tMinMaxToHourly.R
tMinMaxToHourly | R Documentation |
Converts daily values of tmin, tmax and (if they exist) tmean to hourly values, by spline interpolation. Only single columns of the daily temperatures can be used.
tMinMaxToHourly(
obs,
tmin.col = 0,
tmax.col = 0,
tmean.col = 0,
tmin.time = "07:00",
tmax.time = "15:00",
tmean.time = "12:00",
timezone = "",
quiet = TRUE,
logfile = ""
)
obs |
Required. A CRHMr obs dataframe. |
tmin.col |
Optional. The number of the tmin column (omitting the datetime) in the obs dataframe. If omitted, the column named 'tmin' will be used. There must be a tmin column in the dataset |
tmax.col |
Optional. The number of the tmax column (omitting the datetime) in the obs dataframe. If omitted, the column named 'tmax' will be used. There must be a tmax column in the dataset. |
tmean.col |
Optional. The number of the tmax column (omitting the datetime) in the obs dataframe. If omitted, the column named 'tmean' will be searched for. This column need not be present in the dataset. If the value is set to |
tmin.time |
Optional. The time of day at which the minimum air temperature occurs, specified in HH:MM format. If not specified, defaults to 07:00. |
tmax.time |
Optional. The time of day at which the maximum air temperature occurs, specified in HH:MM format. If not specified, defaults to 15:00. |
tmean.time |
Optional. The time of day at which the maximum air temperature occurs, specified in HH:MM format. If not specified, defaults to 12:00. |
timezone |
Required. The name of the timezone of the data as a character string. This should be the timezone of your data, but omitting daylight savings time. Note that the timezone code is specific to your OS. To avoid problems, you should use a timezone without daylight savings time. Under Linux, you can use CST and MST for Central Standard or Mountain Standard time, respectively. Under Windows or OSX, you can use etc/GMT+6 or etc/GMT+7 for Central Standard and Mountain Standard time. DO NOT use America/Regina as the time zone, as it includes historical changes between standard and daylight savings time. |
quiet |
Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave |
logfile |
Optional. Name of the file to be used for logging the action. Normally not used. |
If successful, returns an obs dataframe with the hourly air temperatures. If not successful, returns FALSE
.
Interpolation over intervals longer than 1 day is not allowed.
Kevin Shook
interpolate
## Not run:
MSC.hourly <- tMinMaxToHourly(MSC.daily, timezone='etc/GMT+7')
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.