3 |
michaesp |
1 |
.TH datelist
|
|
|
2 |
.SH NAME
|
|
|
3 |
.B datelist - handling of datelists
|
|
|
4 |
.SH SYNOPSIS
|
|
|
5 |
.B datelist
|
|
|
6 |
.I filename
|
|
|
7 |
.I mode
|
|
|
8 |
.I [ parameters ]
|
|
|
9 |
.SH DESCRIPTION
|
|
|
10 |
A date list is a file of dates in the format {YYYYMMDD_HH}, e.g. 19900101_00 for 00 UTC, 1 January 1990. This command offers several ways how to create date lists and to work with them.
|
|
|
11 |
.SH PARAMETERS
|
|
|
12 |
.TP 10
|
|
|
13 |
.I filename
|
|
|
14 |
name of the date list file. If the name
|
|
|
15 |
.B 'stdout'
|
|
|
16 |
or
|
|
|
17 |
.B 'screen'
|
|
|
18 |
is given, the output will be directed to standardoutput: no file will be created.
|
|
|
19 |
.TP 10
|
|
|
20 |
.I mode
|
|
|
21 |
one of several modes (see below).
|
|
|
22 |
.SH CREATING DATE LISTS
|
|
|
23 |
.TP 5
|
|
|
24 |
.B -create stardate enddate
|
|
|
25 |
create a datelist from startdate (in format {YYYYMMDD_HHMM}) to enddate; the time interval is per default 6 h (see option -interval). If the start and end date do not match with the analysis times, the date list will contain the enclosing analysis times: for instance, for
|
|
|
26 |
.B -create 20100201_04 20100201_19
|
|
|
27 |
the date list will contain the following dates: 20100201_00, 20100201_06, 20100201_12, 20100201_18, 20100202_00.
|
|
|
28 |
.TP 5
|
|
|
29 |
.B -indir dirname
|
|
|
30 |
search for dates (in format {YYYYMMDD_HH}) in the direcory given with {dirname} - the dates are written in ascending order to the datelist file and repeating dates are removed.
|
|
|
31 |
.TP 5
|
|
|
32 |
.B -interval value
|
|
|
33 |
change the interval to {value} hours, instead of the default 6 hours.
|
|
|
34 |
.SH INFO ABOUT DATE LISTS
|
|
|
35 |
.TP 5
|
|
|
36 |
.B -ndates
|
|
|
37 |
write the number of dates in the list
|
|
|
38 |
.TP 5
|
|
|
39 |
.B -timerange
|
|
|
40 |
write the time range {last date} - {first date} [in hours].
|
|
|
41 |
.TP 5
|
|
|
42 |
.B -isin date
|
|
|
43 |
check whether the date is in the list (1) or not (0).
|
|
|
44 |
.SH STEPPING THROUGH DATE LISTS
|
|
|
45 |
.TP 5
|
|
|
46 |
.B -first
|
|
|
47 |
write the first date of the date list
|
|
|
48 |
.TP 5
|
|
|
49 |
.B -last
|
|
|
50 |
write the last date of the date list
|
|
|
51 |
.TP 5
|
|
|
52 |
.B -next date
|
|
|
53 |
find the date {date} in the list and write the
|
|
|
54 |
.B next
|
|
|
55 |
date to screen; if no next date is in the list, i.e. the end of the list is reached, 'nil' will be returned.
|
|
|
56 |
.TP 5
|
|
|
57 |
.B -prev date
|
|
|
58 |
find the date {date} in the list and write the
|
|
|
59 |
.B previous
|
|
|
60 |
date to screen; if no previous date is in the list, i.e. the beginning of the list is reached, 'nil' will be returned.
|
|
|
61 |
.SH COMPARING DATE LISTS
|
|
|
62 |
.TP 5
|
|
|
63 |
.B -overlap file1 file1
|
|
|
64 |
determine the overlap of two date lists.
|
|
|
65 |
.TP 5
|
|
|
66 |
.B -onlyin1 file1 file1
|
|
|
67 |
determine the dates which only occur in date list 1, but not in datelist 2
|
|
|
68 |
.TP 5
|
|
|
69 |
.B -onlyin2 file1 file1
|
|
|
70 |
determine the dates which only occur in date list 2, but not in datelist 1
|
|
|
71 |
.SH Examples
|
|
|
72 |
.TP 5
|
|
|
73 |
.B [1] datelist screen -indir ./
|
|
|
74 |
look for dates in the current directory and write them to screen
|
|
|
75 |
.TP 5
|
|
|
76 |
.B [2] datelist dates -create 19890101_00 20110101_00 -interval 2
|
|
|
77 |
creates dates from 00 UTC, 1 January 1989 to 00 UTC, 1 January 2011 with an interval of 2 hours. The output will be written to the file 'dates'.
|
|
|
78 |
.SH AUTHOR
|
|
|
79 |
Written by Michael Sprenger and Heini Wernli (January 2011)
|