Last data update: 2014.03.03

R: Calibrates the shape of the night interpolating curve
shape_calibrationR Documentation

Calibrates the shape of the night interpolating curve

Description

Calibrates the shape of the night interpolating curve, either horizontal-axe parabola or line, by changing the exponent z (see reference). It functions according to the comparison of the daily thermal range and the climate (reference) monthly one.

Usage

  shape_calibration(meas, date.format = "ymd",
    cal_times_list, band_min = 0:23, band_max = 0:23,
    ratio_dtr_range = c(0, 6), nr_cycles = 10,
    min_mo.length = 21, full.24.hrs.span_min = TRUE,
    silent = FALSE)

Arguments

meas

measured hourly values file (table), where the first column is the series' ID

date.format

input date format (formats for function chron)

cal_times_list

calibration list of "time" parameters (output of par_calibration)

band_min

band of hours of occurrence of day minimum in the daily series (continuous). See Note

band_max

same for maximum time

ratio_dtr_range

range for seeking the optimal value of ratio_dtr

nr_cycles

number of calibration trials within the calibration ranges (all)

min_mo.length

minimum number of days to calculate any monthly values of dtr (is passed to function Mo.Th.Ra.)

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 containing the optimum values of ratio_dtr

Note

meas must be organized as 4-field records, all series in the same file, no headers. Column order: station ID, date, time (hour), T, [others fields, if any...] separated by spaces. This field order is mandatory.

Default date format is "ymd" (yyyy/mm/dd). Different combinations can be passed to function with date.format, but separator must be "/"

band_min and band_max are the time bands according to which the minimum and maximum temperature were calculated in the daily series to be interpolated. In general, they range from 0 to 23, unless the series has had some restriction in the calculation of minimum and maximum values. Hence, these bands can be different from those used to calibrate the most frequent occurrence of min and max.

The optimal value of ratio_dtr (k, eq. 7, in the quoted reference Eccel (2010a)) is chosen as the one with the (absolute) minimum value of the bias (irrespective of its sign). ratio_dtr is the ratio between the daily thermal range of the day to be interpolated and the mean monthly value for that series. The corresponding values of mean absolute error and RMSE can be checked in the resulting list.

min_mo.length (passed to function Mo.Th.Ra.) refers to the sum of days along all the series for each specific month, not for any single month in one year.

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.

Author(s)

Emanuele Eccel, Emanuele Cordano emanuele.eccel@iasma.it

References

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 http://www.agrometeorologia.it/documenti/Rivista2010_2/AIAM%202-2010_pag45.pdf,www.agrometeorologia.it

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/

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. http://www.agrometeorologia.it/documenti/Rivista2010_2/AIAM%202-2010_pag41.pdf,www.agrometeorologia.it

See Also

par_calibration, Th_interp

Examples

library(Interpol.T)
data(Trentino_hourly_T)

stations <- c("T0001","T0010","T0129")

calibration_shape <- shape_calibration(meas = h_d_t[h_d_t$V1 %in% stations,],
						cal_times_list = calibration_l[stations],
                     band_min = 0:23, band_max = 0:23, ratio_dtr_range = c(0,4),
						min_mo.length=21)

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/shape_calibration.Rd_%03d_medium.png", width=480, height=480)
> ### Name: shape_calibration
> ### Title: Calibrates the shape of the night interpolating curve
> ### Aliases: shape_calibration
> 
> ### ** Examples
> 
> library(Interpol.T)
> data(Trentino_hourly_T)
> 
> stations <- c("T0001","T0010","T0129")
> 
> calibration_shape <- shape_calibration(meas = h_d_t[h_d_t$V1 %in% stations,],
+ 						cal_times_list = calibration_l[stations],
+                      band_min = 0:23, band_max = 0:23, ratio_dtr_range = c(0,4),
+ 						min_mo.length=21)
[1] Calibration of ratio_dtr...
[1] 
[1] T0001
[1] T0010
[1] T0129
[1] 
[1] Calibration of ratio_dtr completed successfully!
[1] 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>