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

View source: R/era-clim.R

wmo_time_consistencyR Documentation

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.

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_tol 4 ºC 7 ºC 9 ºC 15 ºC 25 ºC
    td_tol 4 ºC 6 ºC 8 ºC 12 ºC 20 ºC
    pp_tol 3 hPa 6 hPa 9 hPa 18 hPa 36 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".

Author(s)

Clara Ventura, Yuri Brugnara

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

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


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