drywetlong: Detects wet/dry long periods

Description Usage Arguments Value Examples

View source: R/drywetlong.R

Description

This function detects episodes of too many consecutive wet or dry days

Usage

1
drywetlong(x, ret = 300, sueco = 9.9, dry = TRUE, wet = TRUE)

Arguments

x

vector with values

ret

pseudo-return period (pareto-based) to compute the maximum tolerable spell

sueco

threshold for dividing dry and wet. This is useful to label other binary sequences, e.g. for 0 radiation. Now it is <= and >, instead of < and >=

dry

if set to TRUE, dry sequences are sent to result; if FALSE, omitted

wet

same as previous, for wet sequences

Value

list of positions in the input data time series which do not pass QC test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#Extract the ECA&D data file from the example data folder
path2inptfl<-system.file("extdata", "RR_SOUID132730.txt", package = "INQC")
#Read the data file
x<-readecad(input=path2inptfl,missing= -9999)[,4:4]
#Find all suspicious positions in the precipitation time series
drywetlong(x,ret=300,sueco=9.9,dry=TRUE,wet=TRUE)

#Introduce the long wet period
x[1:600]<-10
#Find all suspicious positions in the precipitation time series
drywetlong(x,ret=300,sueco=9.9,dry=TRUE,wet=TRUE)

INQC documentation built on May 24, 2021, 5:07 p.m.