Th_interp: 24-hourly interpolation of temperature

Description Usage Arguments Value Note Author(s) References See Also

View source: R/F_Th_interp.R


The function creates 24 values of hourly temperature from minimum and maximum daily values. This function applies to single series and to single day couples of minimum and maximum temperature. It is called by functions Th_int_series and shape_calibration. The function uses four different curves: from time 00 to the minimum time: a horizontal-axis parabola (a line, if this choice is enabled and according to the daily thermal range of the day); from minimum to maximum time: an increasing sinusoidal curve; from maximum time to sunset: a decreasing sinusoidal curve; from sunset to time = 23: a horizontal-axis parabola (a line, if this choice is enabled and according to the daily thermal range of the day). Calibration parameters are series- and monthly-specific. This function is operationally called by Th_int_series, which requires the daily series and the calibration table as input (plus other parameters). A general user will conveniently use the latter function.


  Th_interp(Tmin, Tmax, Tsuns = NULL, Th_24_before = NULL,
    day, tab_calibr, dtr_month = NULL, ratio_dtr = NULL,
    late_min = TRUE)



a daily table of 4 named columns, the first 3 being year, month, day, the 4th minimum temperature. The column names "month" and "T" are mandatory


same for Tmax


temperature at sunset time


temperature at time 24 of the previous day (time 00 of the present day)


progressive number of the day (row of both Tmin and Tmax), corresponding to a day


"hour" parameter calibration table for the specific series. See par_calibration


monthly daily thermal range table (see function Mo.Th.Ra.)


parameter for the choice of the night curve shape; it is NULL if no calibration_shape is passed to the function by Th_int_series


logical; allows to shift the time of occurrence of minima to the late hours of the day (assumes the value of full.24.hrs.span_min, passed by functions Th_int_series) and shape_calibration)


A vector containing the values from hour = 0 (element 1) to hour = 23 (element 24)


The function is called by Th_int_series.

If the series ID coincides with one with non-null results of the par_calibration function (enough data for calibration) its table is passed to the interpolation function, otherwise the average (cal_table) is used.

A non-NULL value for ratio_dtr enables the function to interpolate night values with a line, if the conditions on Daily Thermal Range occur. This may give rise to a sharp change for the hours following the min.

Tmin of the day before the first is set = to Tmin of the first day and Tmin of the day after the last = Tmin of the last day.

If T from sunset falls below the minimum of the day (temptatively attributed to time_min), an adjustement is done: the early hours assume a constant T = T[00] and the minimum is shifted so that T[23] = Tmin for that day

Since the very first value of T series at sunset (of the day before) is NULL, the first hourly values produced till time_min are = Tmin of the day.


Emanuele Eccel, Emanuele Cordano


Eccel, E., 2010: What we can ask to hourly temperature recording. Part II: hourly interpolation of temperatures for climatology and modelling. Italian Journal of Agrometeorology XV(2):45-50,

Original algorithm from: Cesaraccio, C., Spano, D., Duce, P., Snyder, R.L., 2001. An improved model for determining degree-day values from daily temperature data. Int. J. Biometeorol. 45: 161-169.

See also: Eccel, E., 2010: What we can ask to hourly temperature recording. Part I: statistical vs. meteorological meaning of minimum temperature. Italian Journal of Agrometeorology XV(2):41-43.,

See Also


Interpol.T documentation built on May 2, 2019, 12:21 a.m.