dataclim-class: Class '"dataclim"'

Description Objects from the Class Slots Methods Note Author(s) References Examples

Description

The class provides a standardized container for climate data with in-built Quality Control (QC). Its objects ensure a correct input for the tests and functions of this package.

Objects from the Class

Objects can be created by calls of the form

new("dataclim", date, tmin, tmax, prec, basePeriod, convertFlaggedToNA, ...),

although createDataclim is more handy.

Dataclim objects contain monthly and annual aggregates of daily input data after after Qualitiy Control (QC) and padded with NA to ensure complete calendar year coverage. Suspect entries are flagged.

The QC follows closely the Algorithm Theoretical Basis Document (ATBD) of the European Climate Assessment & Dataset project (ECA&D), hosted by the Dutch meteorological service KNMI. Currently, only QCs for temperature and precipitation are implemented.

Slots

basePeriod:

Object of class "numeric". A vector of years. Temperature QC evaluates the deviation from the mean annual cycle computed over these years.

flagged:

Object of class "list". A list with components of each variable, containing the (row-) indices of suspect days according to the QC of the respective variable.

flaggedData:

Object of class "zoo" from package zoo. A zoo containing all days where QC detected something.

data:

Object of class "zoo". Daily data, where suspect entries are set to NA (if convertFlaggedToNA is TRUE).

monthlyAvg, monthlyMin, monthlyMax:

Objects of class "zoo". Monthly aggregates of the daily data for months with not more than three NA days. Precipitation in monthlyAvg is given as sums.

annualAvg, annualMin, annualMax:

Objects of class "zoo". Annual aggregates of the above monthly data. Only years with non-missing monthly data are considered here.

convertFlaggedToNA:

logical, are entries with quality issues set to NA?

Methods

initialize

signature(.Object = "dataclim"): Constructor of a dataclim object. Performs QC and fills the slots.

show

signature(object = "dataclim"): Nice display.

summary

signature(object = "dataclim"): Computes summary statistics from a dataclim objects: means, standard deviations, annual cycles of monthly averages, minimum and maximum and annual and monthly trends (slope and p-value). These statistics are computed over the years given in the optional basePeriod vector (defaults to the basePeriod-slot of the dataclim object).

Note

Slots can be accessed with slot(object, name). See ?slot for help.

Author(s)

Boris Orlowsky <boris@climate-babel.org>

References

The ATBD: http://www.ecad.eu/documents/atbd.pdf

Examples

1
showClass("dataclim")

Example output

Class "dataclim" [package "iki.dataclim"]

Slots:
                                                               
Name:          basePeriod            flagged        flaggedData
Class:            numeric               list                zoo
                                                               
Name:                data         monthlyAvg          annualAvg
Class:                zoo                zoo                zoo
                                                               
Name:          monthlyMin          annualMin         monthlyMax
Class:                zoo                zoo                zoo
                                            
Name:           annualMax convertFlaggedToNA
Class:                zoo            logical

iki.dataclim documentation built on May 2, 2019, 2:38 a.m.