Learn R Programming

dataresqc (version 1.1.1)

wmo_time_consistency: WMO Time Consistency Test for Pressure, Temperature and Dew Point.

Description

Applicable to a series of sub-daily air pressure (p, mslp), air temperature (ta) or dew point temperature (td) observations with at least some time intervals between observations less or equal to twelve hours. Flags the records where the observations exceed the WMO suggested tolerances for the temperatures and pressure tendency as function of time period between consecutive reports.

Usage

wmo_time_consistency(series, meta = NULL, outpath)

Arguments

series

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.

meta

A character vector with 6 elements: station ID, latitude, longitude, altitude, variable code, units. If series is a path, meta is ignored.

outpath

Character string giving the path for the QC results.

Author

Clara Ventura, Yuri Brugnara

Details

Input:

  • A SEF file or a data frame and metadata. The observations data frame must have seven columns: variable code, year (YYYY), month (MM), day (DD), hour (HH), minute (MM), observation.

The WMO time consistency test:

  • WMO suggested tolerances for the temperatures and pressure tendency as function of time period between consecutive reports (WMO, 1993: VI.21):

    Parameter |dt = 1 hour |dt = 2 hours |dt = 3 hours |dt = 6 hours |dt = 12 hours
    ta_tol4 ºC7 ºC9 ºC15 ºC25 ºC
    td_tol4 ºC6 ºC8 ºC12 ºC20 ºC
    pp_tol3 hPa6 hPa9 hPa18 hPa36 hPa
  • The temperatures tolerance - ta_tol and td_tol - considered for 1, 2, 3, 6 and 12 hours is given by the table above.

  • The pressure tolerance p_tol is determined for time intervals belonging to [1, 12] hours, assuming that there is a linear variation of 3 hPa per hour, based in the table above.

  • Time consistency test (WMO, 1993: VI.21):

    \(| obs(t) - obs(t - dt) | > tol => flag_obs(t) = suspect and flag_obs(t-dt) = suspect\)

    \(obs - observation (ta, td or p), t - hour in decimal, dt - hour difference in decimal, tol - tolerance\)

  • The flag, correspondent to suspect values, is always associated with two consecutive observations within twelve hours.

Output:

  • A text file of flagged observations with eight columns: variable code, year, month, day, hour, minute, value, test. The test column has the description "wmo_time_consistency".

References

WMO, 1993: Chapter 6 - Quality Control Procedures. Guide on the Global Data-processing System, World Meteorological Organization, Geneva, No. 305, VI.1-VI.27, ISBN 92-63-13305-0.

Examples

Run this code
wmo_time_consistency(series = Bern$p, meta = Meta$p[which(Meta$p$id=="Bern"),],
                     outpath = tempdir())

Run the code above in your browser using DataLab