plot_subdaily: Plot sub-daily data points

View source: R/decade.R

plot_subdailyR Documentation

Plot sub-daily data points

Description

Plot sub-daily data points divided by month.

Usage

plot_subdaily(
  subdailydata,
  year = NA,
  outfile,
  fixed = TRUE,
  units = NA,
  time_offset = 0,
  ...
)

Arguments

subdailydata

A character string giving the path of the input file, or a 7-column matrix with following columns: variable code, year, month, day, hour, minute, value.

year

Integer vector giving the year(s) to plot. If not specified (NA), all available years will be plotted. One pdf per year will be created.

outfile

Character string giving the path of the output pdf file. If year has more than one element or is NA, then this is a root to the filenames to which the year will be added ('root.year.pdf').

fixed

If TRUE (default), use the same y axis for all months. If FALSE, the axis limits are set based on the data range of each month.

units

Character string giving the units (will be printed in the y-axis). If subdailydata is a path to a file, then the units are read from the SEF header.

time_offset

Numeric vector of offsets in hours to be applied to the observation times. Recycled if only one value is given. The default is no offset, i.e. UTC times for SEF input.

...

Graphical parameters passed to the function plot, such as cex, lwd, pch, col, etc. (see par).

Details

Creates one pdf for each year plotted.

The input file must follow the C3S Station Exchange Format (SEF).

The parameter time_offset can be used to plot observations in local time when reading the data in SEF.

Author(s)

Stefan Hunziker, Yuri Brugnara

References

Hunziker et al., 2017: Identifying, attributing, and overcoming common data quality issues of manned station observations. Int. J. Climatol, 37: 4131-4145.

Hunziker et al., 2018: Effects of undetected data quality issues on climatological analyses. Clim. Past, 14: 1-20.

Examples

plot_subdaily(Bern$p, year = 1803:1804, outfile = paste0(tempdir(),"/test"))


c3s-data-rescue-service/dataresqc documentation built on April 10, 2023, 4:18 p.m.