R: Hourly interpolation of multiple daily temperature series
Th_int_series
R Documentation
Hourly interpolation of multiple daily temperature series
Description
The function creates sets of hourly temperature series,
in a specified period, from minimum and maximum daily
series. The calibration files, created by the functions
par_calibration and shape_calibration, are
loaded and passed to function Th_interp.
calibration table of "time" parameters
for the specific series
cal_shape
calibration table for "shape" parameter
for the specific series; default is NULL(don't
use)
TMIN
minimum temperature daily table
TMAX
maximum temperature daily table
start_year
year of simulation start
end_year
year of simulation end
active_IDs
a set of series IDs to be interpolated.
If NULL (default), all series are interpolated
min_mo.length
minimum number of days necessary to
calculate monthly dtr values
full.24.hrs.span_min
logical, if set to
FALSE does not allow to shift minimum time to the
late hours of the day
silent
logical: if set to TRUE suppresses
any warning issue
Value
A list of interpolated hourly temperatures for the
active_IDs series
Note
TMIN and TMAX are data frames with the
first three columns devoted to the date. The names of
these columns must be "year", "month", and "day",
irrespective of their order. Data series range from
column 4 to the last.
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.
full.24.hrs.span_min is TRUE as default. If
must be set to FALSE only if minimum values of the
daily series have been calculated on a restricted time
band, which is included in band_min (see function
par_calibration). If this is the case, the minimum
of the interpolated curve will always fall within
band_min (early hours of the day). If this option
is erroneously chosen, errors as large as 0.6 deg C can
arise in the average of mean daily T.
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.
Since the first value of T at sunset (of the day before)
is NULL, the first hourly values produced till
time_min are = Tmin.
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.
http://www.springerlink.com/content/qwctkmlq3tebthek/
library(Interpol.T)
data(Trentino_hourly_T)
stations <- c("T0001","T0010","T0129")
# interpolation of temperature for series T0001 and T0129, from 2004 to 2005
Th_int_list <- Th_int_series(cal_times = calibration_l,
cal_shape = calibration_shape,
TMIN=Tn, TMAX=Tx,
start_year = 2004, end_year = 2005,
active_IDs = stations)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Interpol.T)
Loading required package: date
Loading required package: chron
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Interpol.T/Th_int_series.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Th_int_series
> ### Title: Hourly interpolation of multiple daily temperature series
> ### Aliases: Th_int_series
>
> ### ** Examples
>
> library(Interpol.T)
> data(Trentino_hourly_T)
> stations <- c("T0001","T0010","T0129")
> # interpolation of temperature for series T0001 and T0129, from 2004 to 2005
> Th_int_list <- Th_int_series(cal_times = calibration_l,
+ cal_shape = calibration_shape,
+ TMIN=Tn, TMAX=Tx,
+ start_year = 2004, end_year = 2005,
+ active_IDs = stations)
[1] Now processing series T0001
[1] Now processing series T0010
[1] Now processing series T0129
>
>
>
>
>
> dev.off()
null device
1
>