createlfobj: Create an lfobj for further Low Flow Analysis

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Generic function for creating a low flow object (lfobj). Low flow objects can be created from a time series of daily flow, a data.frame with columns "flow", "day", "month" and "year".

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
createlfobj(x, ...)


## S3 method for class 'data.frame'
createlfobj(x, hyearstart = NULL, baseflow = TRUE,
            meta = list(),...)

## S3 method for class 'ts'
createlfobj(x,
            startdate,
            dateformat = "%d/%m/%Y",
            ...)

## S3 method for class 'lfobj'
createlfobj(x, hyearstart = NULL, baseflow = NULL,
            meta = NULL,...)

Arguments

x

An object out of which a lfobj should be created

hyearstart

integer between 1 and 12, indicating the start of the hydrological year.

baseflow

logical, should the baseflow curve be calculated? Needed, if you want to apply 'bfplot' or 'BFI' later on.

meta

A list of meta-information

startdate

start of the time-series

dateformat

Format of the startdate

...

Additional arguments, passed on to createlfobj.data.frame.

Details

'hyearstart' defines the starting month of the hydrological year. If 'hyearstart' is greater then 6.5, the hydrological year starts earlier then the actual date, e.g. hyearstart = 10, then the 1st of October 2011 is part of the hydrological year 2012. If hyearstart = 4, then the 31st of March 2011 is part of the hydrological year 2010.

When creating an object of class lfobj with the aforementioned functions, eventually createlfobj.data.frame is called.

Value

An object of class 'lfobj'.

Author(s)

Daniel Koffler and Gregor Laaha

References

Gustard, A. & Demuth, S. (2009) (Eds) Manual on Low-flow Estimation and Prediction. Operational Hydrology Report No. 50, WMO-No. 1029, 136p.

See Also

readlfdata

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#Creating a lfobj from a timeseries
#Some sample data:

somevalues <- rexp(365)
#Convert to time series:
time <- ts(somevalues)

#Lets say our data contains values from one hydrological year (Oct-Sep)
#starting on 1. Oct. 1992:
myriver <- createlfobj(time, startdate = "01/10/1992",hyearstart = 10)
#Add meta-data
createlfobj(myriver, meta = list(river = "myriver"))

Example output

Loading required package: xts
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: lmom
Loading required package: lattice
    day month year        flow hyear    baseflow
1     1    10 1992 0.135703538  1993          NA
2     2    10 1992 0.241384182  1993          NA
3     3    10 1992 1.055490454  1993          NA
4     4    10 1992 2.126107206  1993          NA
5     5    10 1992 1.824049957  1993          NA
6     6    10 1992 0.119822959  1993 0.119822959
7     7    10 1992 1.395823140  1993 0.113186216
8     8    10 1992 0.507598365  1993 0.106549474
9     9    10 1992 3.666227763  1993 0.099912731
10   10    10 1992 0.851863368  1993 0.093275989
11   11    10 1992 1.552450932  1993 0.086639246
12   12    10 1992 1.314434863  1993 0.080002503
13   13    10 1992 0.322705602  1993 0.073365761
14   14    10 1992 0.159011429  1993 0.066729018
15   15    10 1992 1.193478497  1993 0.060092276
16   16    10 1992 1.340792176  1993 0.053455533
17   17    10 1992 0.511494406  1993 0.046818791
18   18    10 1992 0.040182048  1993 0.040182048
19   19    10 1992 0.083625955  1993 0.037666488
20   20    10 1992 1.092515942  1993 0.035150927
21   21    10 1992 2.006218674  1993 0.032635367
22   22    10 1992 1.343654065  1993 0.030119806
23   23    10 1992 1.214205909  1993 0.027604246
24   24    10 1992 0.592108749  1993 0.025088686
25   25    10 1992 0.057766066  1993 0.022573125
26   26    10 1992 0.269741248  1993 0.020057565
27   27    10 1992 0.511184744  1993 0.017542004
28   28    10 1992 0.990997495  1993 0.015026444
29   29    10 1992 0.012510884  1993 0.012510884
30   30    10 1992 0.673919527  1993 0.021775446
31   31    10 1992 0.898219775  1993 0.031040008
32    1    11 1992 0.040237258  1993 0.040237258
33    2    11 1992 2.630550572  1993 0.049569132
34    3    11 1992 0.543065958  1993 0.058833694
35    4    11 1992 0.050911779  1993 0.050911779
36    5    11 1992 0.498672652  1993 0.077362818
37    6    11 1992 0.363561867  1993 0.086627380
38    7    11 1992 0.497077176  1993 0.095891942
39    8    11 1992 0.514824112  1993 0.105156504
40    9    11 1992 1.471060367  1993 0.114421066
41   10    11 1992 1.145224282  1993 0.123685629
42   11    11 1992 0.410387257  1993 0.132950191
43   12    11 1992 0.329861554  1993 0.142214753
44   13    11 1992 1.987932249  1993 0.151479315
45   14    11 1992 0.965087791  1993 0.160743877
46   15    11 1992 0.170008439  1993 0.170008439
47   16    11 1992 1.091687245  1993 0.161848633
48   17    11 1992 0.376746461  1993 0.153688827
49   18    11 1992 1.364632811  1993 0.145529021
50   19    11 1992 0.287383301  1993 0.137369214
51   20    11 1992 1.317861862  1993 0.129209408
52   21    11 1992 0.719767823  1993 0.121049602
53   22    11 1992 0.423467996  1993 0.112889796
54   23    11 1992 0.375696612  1993 0.104729990
55   24    11 1992 0.611073628  1993 0.096570184
56   25    11 1992 1.193713938  1993 0.088410378
57   26    11 1992 2.745928200  1993 0.080250571
58   27    11 1992 0.554191673  1993 0.072090765
59   28    11 1992 0.448985659  1993 0.063930959
60   29    11 1992 1.136815197  1993 0.055771153
61   30    11 1992 0.047611347  1993 0.047611347
62    1    12 1992 0.459644582  1993 0.045471748
63    2    12 1992 0.156090474  1993 0.043332149
64    3    12 1992 0.183459826  1993 0.041192550
65    4    12 1992 0.814749809  1993 0.039052951
66    5    12 1992 0.058842742  1993 0.036913352
67    6    12 1992 2.132848518  1993 0.034773753
68    7    12 1992 0.840736319  1993 0.032634154
69    8    12 1992 0.462174254  1993 0.030494555
70    9    12 1992 0.313680399  1993 0.028354956
71   10    12 1992 0.734461111  1993 0.026215357
72   11    12 1992 0.440037474  1993 0.024075758
73   12    12 1992 0.568015197  1993 0.021936159
74   13    12 1992 0.263668623  1993 0.019796560
75   14    12 1992 0.253714290  1993 0.017656961
76   15    12 1992 3.874709477  1993 0.015517362
77   16    12 1992 0.654266195  1993 0.013377764
78   17    12 1992 0.212030082  1993 0.011238165
79   18    12 1992 0.038893625  1993 0.009098566
80   19    12 1992 0.006958967  1993 0.006958967
81   20    12 1992 2.911652423  1993 0.006853572
82   21    12 1992 1.668698123  1993 0.006748176
83   22    12 1992 0.081201158  1993 0.006642781
84   23    12 1992 0.117095943  1993 0.006537386
85   24    12 1992 4.534395743  1993 0.006431991
86   25    12 1992 1.269908248  1993 0.006326596
87   26    12 1992 1.307345227  1993 0.006221201
88   27    12 1992 0.131033608  1993 0.006115806
89   28    12 1992 3.941332226  1993 0.006010411
90   29    12 1992 1.151045007  1993 0.005905016
91   30    12 1992 0.742542279  1993 0.005799620
92   31    12 1992 1.054456584  1993 0.005694225
93    1     1 1993 3.066501603  1993 0.005588830
94    2     1 1993 0.469194255  1993 0.005483435
95    3     1 1993 0.005378040  1993 0.005378040
96    4     1 1993 1.556472835  1993 0.012352364
97    5     1 1993 0.461068866  1993 0.019326689
98    6     1 1993 0.625559737  1993 0.026301013
99    7     1 1993 0.902410979  1993 0.033275338
100   8     1 1993 0.601579786  1993 0.040249662
101   9     1 1993 0.047223987  1993 0.047223987
102  10     1 1993 0.372631901  1993 0.046103267
103  11     1 1993 0.198844838  1993 0.044982547
104  12     1 1993 0.285569060  1993 0.043861827
105  13     1 1993 0.591220535  1993 0.042741108
106  14     1 1993 1.531592198  1993 0.041620388
107  15     1 1993 0.375179162  1993 0.040499668
108  16     1 1993 1.046732096  1993 0.039378949
109  17     1 1993 0.043728997  1993 0.038258229
110  18     1 1993 1.351692772  1993 0.037137509
111  19     1 1993 0.805443090  1993 0.036016789
112  20     1 1993 0.222270039  1993 0.034896070
113  21     1 1993 2.650345189  1993 0.033775350
114  22     1 1993 0.350934830  1993 0.032654630
115  23     1 1993 0.031533910  1993 0.031533910
116  24     1 1993 2.209239649  1993 0.034958560
117  25     1 1993 0.274087123  1993 0.038383210
118  26     1 1993 0.361857116  1993 0.041807860
119  27     1 1993 3.669019014  1993 0.045232510
120  28     1 1993 1.022037989  1993 0.048657160
121  29     1 1993 0.628858947  1993 0.052081810
122  30     1 1993 0.294581531  1993 0.055506460
123  31     1 1993 3.964278331  1993 0.058931110
124   1     2 1993 0.321667299  1993 0.062355760
125   2     2 1993 2.100329542  1993 0.065780410
126   3     2 1993 0.205111133  1993 0.069205060
127   4     2 1993 0.088676794  1993 0.072629710
128   5     2 1993 0.375170146  1993 0.076054359
129   6     2 1993 0.079479009  1993 0.079479009
130   7     2 1993 0.735761323  1993 0.087910862
131   8     2 1993 0.820728811  1993 0.096342714
132   9     2 1993 0.546641760  1993 0.104774567
133  10     2 1993 3.714905085  1993 0.113206419
134  11     2 1993 0.456631402  1993 0.121638272
135  12     2 1993 1.044288895  1993 0.130070124
136  13     2 1993 5.057684229  1993 0.138501977
137  14     2 1993 0.146933829  1993 0.146933829
138  15     2 1993 0.841822445  1993 0.140613048
139  16     2 1993 0.299845302  1993 0.134292268
140  17     2 1993 0.175883157  1993 0.127971487
141  18     2 1993 1.786978841  1993 0.121650707
142  19     2 1993 1.342299481  1993 0.115329926
143  20     2 1993 0.292767913  1993 0.109009146
144  21     2 1993 1.004734630  1993 0.102688365
145  22     2 1993 1.644812768  1993 0.096367584
146  23     2 1993 0.264622528  1993 0.090046804
147  24     2 1993 0.178817336  1993 0.083726023
148  25     2 1993 0.428559368  1993 0.077405243
149  26     2 1993 1.861951439  1993 0.071084462
150  27     2 1993 0.064763682  1993 0.064763682
151  28     2 1993 3.042109501  1993 0.062623874
152   1     3 1993 0.060484067  1993 0.060484067
153   2     3 1993 0.557946849  1993 0.060161773
154   3     3 1993 0.873766476  1993 0.059839480
155   4     3 1993 2.312502256  1993 0.059517187
156   5     3 1993 0.162120094  1993 0.059194894
157   6     3 1993 0.444458092  1993 0.058872601
158   7     3 1993 0.300335609  1993 0.058550307
159   8     3 1993 1.945180213  1993 0.058228014
160   9     3 1993 0.266170579  1993 0.057905721
161  10     3 1993 1.253439654  1993 0.057583428
162  11     3 1993 0.230410296  1993 0.057261135
163  12     3 1993 0.056938842  1993 0.056938842
164  13     3 1993 0.213036601  1993 0.057098880
165  14     3 1993 1.295113941  1993 0.057258918
166  15     3 1993 0.129295838  1993 0.057418956
167  16     3 1993 0.066015462  1993 0.057578995
168  17     3 1993 0.934861463  1993 0.057739033
169  18     3 1993 1.110073673  1993 0.057899071
170  19     3 1993 0.680206667  1993 0.058059110
171  20     3 1993 2.494303314  1993 0.058219148
172  21     3 1993 0.888509786  1993 0.058379186
173  22     3 1993 0.495694379  1993 0.058539224
174  23     3 1993 0.121658320  1993 0.058699263
175  24     3 1993 1.722158628  1993 0.058859301
176  25     3 1993 0.059019339  1993 0.059019339
177  26     3 1993 0.507952960  1993 0.057592914
178  27     3 1993 2.182193880  1993 0.056166489
179  28     3 1993 0.355230848  1993 0.054740063
180  29     3 1993 1.662734833  1993 0.053313638
181  30     3 1993 0.134305325  1993 0.051887212
182  31     3 1993 0.677637150  1993 0.050460787
183   1     4 1993 0.253235521  1993 0.049034362
184   2     4 1993 0.239562473  1993 0.047607936
185   3     4 1993 0.951795149  1993 0.046181511
186   4     4 1993 2.694495829  1993 0.044755085
187   5     4 1993 1.011138019  1993 0.043328660
188   6     4 1993 0.240717757  1993 0.041902235
189   7     4 1993 0.138041535  1993 0.040475809
190   8     4 1993 0.517893473  1993 0.039049384
191   9     4 1993 0.595780337  1993 0.037622959
192  10     4 1993 1.736618069  1993 0.036196533
193  11     4 1993 0.106741304  1993 0.034770108
194  12     4 1993 0.644264120  1993 0.033343682
195  13     4 1993 0.883848962  1993 0.031917257
196  14     4 1993 1.212534309  1993 0.030490832
197  15     4 1993 1.768814271  1993 0.029064406
198  16     4 1993 0.220641559  1993 0.027637981
199  17     4 1993 2.458107365  1993 0.026211556
200  18     4 1993 0.034545023  1993 0.024785130
201  19     4 1993 0.036386617  1993 0.023358705
202  20     4 1993 0.355528095  1993 0.021932279
203  21     4 1993 1.664421242  1993 0.020505854
204  22     4 1993 0.019079429  1993 0.019079429
205  23     4 1993 4.008038988  1993 0.019009855
206  24     4 1993 0.396498399  1993 0.018940282
207  25     4 1993 0.643462360  1993 0.018870709
208  26     4 1993 0.693014546  1993 0.018801136
209  27     4 1993 0.381386660  1993 0.018731562
210  28     4 1993 1.086040597  1993 0.018661989
211  29     4 1993 0.814960338  1993 0.018592416
212  30     4 1993 2.629630701  1993 0.018522843
213   1     5 1993 0.850066137  1993 0.018453269
214   2     5 1993 0.810371418  1993 0.018383696
215   3     5 1993 0.872389526  1993 0.018314123
216   4     5 1993 0.223921043  1993 0.018244550
217   5     5 1993 2.059324089  1993 0.018174977
218   6     5 1993 2.680206416  1993 0.018105403
219   7     5 1993 0.649861161  1993 0.018035830
220   8     5 1993 0.252924170  1993 0.017966257
221   9     5 1993 1.381844053  1993 0.017896684
222  10     5 1993 0.017827110  1993 0.017827110
223  11     5 1993 2.407549163  1993 0.020673999
224  12     5 1993 1.143271844  1993 0.023520887
225  13     5 1993 0.231697290  1993 0.026367775
226  14     5 1993 0.050044636  1993 0.029214663
227  15     5 1993 0.850306808  1993 0.032061552
228  16     5 1993 1.729389585  1993 0.034908440
229  17     5 1993 0.473269749  1993 0.037755328
230  18     5 1993 0.690739750  1993 0.040602216
231  19     5 1993 0.922916927  1993 0.043449105
232  20     5 1993 0.196001899  1993 0.046295993
233  21     5 1993 3.356960721  1993 0.049142881
234  22     5 1993 1.895984534  1993 0.051989770
235  23     5 1993 0.341215380  1993 0.054836658
236  24     5 1993 0.164865820  1993 0.057683546
237  25     5 1993 0.147820509  1993 0.060530434
238  26     5 1993 1.449963037  1993 0.063377323
239  27     5 1993 3.998888930  1993 0.066224211
240  28     5 1993 0.069071099  1993 0.069071099
241  29     5 1993 3.733106112  1993 0.067235085
242  30     5 1993 0.130671990  1993 0.065399072
243  31     5 1993 1.428448999  1993 0.063563058
244   1     6 1993 1.087555803  1993 0.061727044
245   2     6 1993 1.167149314  1993 0.059891030
246   3     6 1993 0.466414638  1993 0.058055017
247   4     6 1993 0.234010779  1993 0.056219003
248   5     6 1993 2.336840453  1993 0.054382989
249   6     6 1993 0.529781862  1993 0.052546976
250   7     6 1993 0.654193730  1993 0.050710962
251   8     6 1993 0.859507783  1993 0.048874948
252   9     6 1993 3.083579883  1993 0.047038934
253  10     6 1993 1.533954244  1993 0.045202921
254  11     6 1993 1.821037691  1993 0.043366907
255  12     6 1993 0.463917130  1993 0.041530893
256  13     6 1993 0.282220218  1993 0.039694879
257  14     6 1993 0.583697198  1993 0.037858866
258  15     6 1993 0.036022852  1993 0.036022852
259  16     6 1993 1.564861608  1993 0.034122201
260  17     6 1993 1.507857775  1993 0.032221549
261  18     6 1993 0.749483458  1993 0.030320898
262  19     6 1993 0.747489942  1993 0.028420247
263  20     6 1993 0.665875769  1993 0.026519596
264  21     6 1993 0.326817280  1993 0.024618944
265  22     6 1993 0.829263492  1993 0.022718293
266  23     6 1993 3.182762831  1993 0.020817642
267  24     6 1993 0.018916990  1993 0.018916990
268  25     6 1993 1.166441439  1993 0.018444252
269  26     6 1993 0.049650779  1993 0.017971514
270  27     6 1993 0.187820044  1993 0.017498776
271  28     6 1993 0.069256152  1993 0.017026038
272  29     6 1993 0.069820122  1993 0.016553300
273  30     6 1993 1.037647831  1993 0.016080562
274   1     7 1993 2.527554290  1993 0.015607823
275   2     7 1993 1.031767692  1993 0.015135085
276   3     7 1993 4.167088259  1993 0.014662347
277   4     7 1993 1.011334928  1993 0.014189609
278   5     7 1993 0.580522106  1993 0.013716871
279   6     7 1993 0.480049373  1993 0.013244133
280   7     7 1993 0.012771394  1993 0.012771394
281   8     7 1993 0.210044869  1993 0.014177893
282   9     7 1993 0.075360319  1993 0.015584391
283  10     7 1993 0.394711830  1993 0.016990889
284  11     7 1993 0.297822178  1993 0.018397387
285  12     7 1993 0.280772130  1993 0.019803885
286  13     7 1993 0.835308786  1993 0.021210383
287  14     7 1993 0.696279061  1993 0.022616881
288  15     7 1993 4.448311914  1993 0.024023379
289  16     7 1993 1.771944765  1993 0.025429877
290  17     7 1993 0.312407079  1993 0.026836375
291  18     7 1993 0.028242874  1993 0.028242874
292  19     7 1993 3.124502296  1993 0.030892669
293  20     7 1993 1.894214466  1993 0.033542464
294  21     7 1993 4.551191408  1993 0.036192259
295  22     7 1993 0.495621704  1993 0.038842054
296  23     7 1993 0.264855560  1993 0.041491849
297  24     7 1993 0.319105994  1993 0.044141644
298  25     7 1993 0.851387854  1993 0.046791439
299  26     7 1993 0.370011190  1993 0.049441234
300  27     7 1993 0.173546176  1993 0.052091029
301  28     7 1993 0.338697834  1993 0.054740824
302  29     7 1993 0.259286555  1993 0.057390620
303  30     7 1993 0.343567747  1993 0.060040415
304  31     7 1993 0.062690210  1993 0.062690210
305   1     8 1993 2.952628866  1993 0.062706108
306   2     8 1993 0.455731789  1993 0.062722005
307   3     8 1993 2.115795767  1993 0.062737903
308   4     8 1993 0.686919121  1993 0.062753801
309   5     8 1993 1.004212353  1993 0.062769699
310   6     8 1993 4.827337015  1993 0.062785597
311   7     8 1993 1.651359951  1993 0.062801495
312   8     8 1993 0.694940958  1993 0.062817393
313   9     8 1993 1.335656692  1993 0.062833291
314  10     8 1993 0.678288937  1993 0.062849188
315  11     8 1993 0.543795786  1993 0.062865086
316  12     8 1993 0.265314251  1993 0.062880984
317  13     8 1993 1.067219684  1993 0.062896882
318  14     8 1993 1.725598667  1993 0.062912780
319  15     8 1993 0.577680697  1993 0.062928678
320  16     8 1993 1.351537238  1993 0.062944576
321  17     8 1993 1.221604940  1993 0.062960474
322  18     8 1993 0.062976371  1993 0.062976371
323  19     8 1993 0.081416917  1993 0.061108806
324  20     8 1993 0.732235938  1993 0.059241241
325  21     8 1993 0.822739475  1993 0.057373676
326  22     8 1993 0.746164257  1993 0.055506110
327  23     8 1993 0.397740081  1993 0.053638545
328  24     8 1993 1.227597119  1993 0.051770980
329  25     8 1993 0.468270140  1993 0.049903414
330  26     8 1993 0.549358465  1993 0.048035849
331  27     8 1993 1.673825556  1993 0.046168284
332  28     8 1993 1.543473633  1993 0.044300718
333  29     8 1993 0.393868398  1993 0.042433153
334  30     8 1993 0.413680286  1993 0.040565588
335  31     8 1993 0.265511805  1993 0.038698022
336   1     9 1993 0.067907217  1993 0.036830457
337   2     9 1993 1.820461046  1993 0.034962892
338   3     9 1993 0.561427663  1993 0.033095326
339   4     9 1993 0.980945207  1993 0.031227761
340   5     9 1993 0.065315928  1993 0.029360196
341   6     9 1993 0.867047544  1993 0.027492630
342   7     9 1993 0.025625065  1993 0.025625065
343   8     9 1993 1.509794072  1993 0.031192117
344   9     9 1993 0.794104115  1993 0.036759169
345  10     9 1993 0.600223558  1993 0.042326220
346  11     9 1993 0.383868992  1993 0.047893272
347  12     9 1993 1.411932585  1993 0.053460324
348  13     9 1993 1.035336850  1993 0.059027376
349  14     9 1993 1.859107423  1993 0.064594427
350  15     9 1993 2.202021955  1993 0.070161479
351  16     9 1993 1.627769170  1993 0.075728531
352  17     9 1993 0.320523766  1993 0.081295583
353  18     9 1993 0.790911707  1993 0.086862634
354  19     9 1993 0.819850214  1993 0.092429686
355  20     9 1993 0.185897719  1993 0.097996738
356  21     9 1993 3.090191670  1993 0.103563790
357  22     9 1993 0.109130842  1993 0.109130842
358  23     9 1993 0.583477669  1993          NA
359  24     9 1993 1.152455971  1993          NA
360  25     9 1993 0.980356697  1993          NA
361  26     9 1993 2.391479460  1993          NA
362  27     9 1993 1.093013070  1993          NA
363  28     9 1993 2.871354121  1993          NA
364  29     9 1993 1.468341667  1993          NA
365  30     9 1993 1.961570699  1993          NA

lfstat documentation built on May 2, 2019, 6:07 p.m.