Last data update: 2014.03.03

R: Plots hourly curves
plot_meas_simR Documentation

Plots hourly curves

Description

Plots curves for comparison between measures and simulations (hourly interpolations)

Usage

  plot_meas_sim(meas, sim, series = NULL, chart.start,
    chart.end, date.format = "ymd", missing_code = NA,
    wait = 1, plot.leg = TRUE, leg.pos = "bottomright")

Arguments

meas

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

sim

simulated hourly list (output of Th_int_series)

series

names of the seris to plot. If NULL, plots all the series

chart.start

start date for the plotting. Format example: "1Jan2000"

chart.end

end date for the plotting. Format example: "1Jan2000"

date.format

input date format for measurements (formats for function chron). Default is "ymd"

missing_code

code (either real or character) for missing values in measurements. Default is NA

wait

lag time (seconds) between plot appearance on the screen (default is 1 second)

plot.leg

logical: if TRUE (default) legends are plotted

leg.pos

position of legends (only if plot.leg = TRUE). Default is "bottomright". Values for par can be passed to function

Value

A plot with two curves: measured values and hourly interpolations

Note

If daily minimum and maximum values are the absolute ones for each day, the interpolated curve will be generally either higher (maximum) or lower (minimum) than hourly measurements, which are mean hourly values (hence, slightly lower and higher than the absolute daily ones, respectively). This may explain an apparent mismatch between the two curves.

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

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

Examples

data(Trentino_hourly_T)
stations <- c("T0001","T0010","T0129")
plot_meas_sim(meas = h_d_t, sim = Th_int_list, series=stations,
              missing_code = -999.9, chart.start = "1Feb2004",
             chart.end = "29Feb2004", leg.pos = "top")

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/plot_meas_sim.Rd_%03d_medium.png", width=480, height=480)
> ### Name: plot_meas_sim
> ### Title: Plots hourly curves
> ### Aliases: plot_meas_sim
> 
> ### ** Examples
> 
> data(Trentino_hourly_T)
> stations <- c("T0001","T0010","T0129")
> plot_meas_sim(meas = h_d_t, sim = Th_int_list, series=stations,
+               missing_code = -999.9, chart.start = "1Feb2004",
+              chart.end = "29Feb2004", leg.pos = "top")
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>