xt2 is a shorthand program for extracting data to predefined file names. It is designed to work similar to the legacy “xt” program, though it does not replicate the functionality of that program.
xt2 [--header] [--short] [--raw] [--clean] [-r] [-e] [-c] <-e|-h|-d|-m|record> [station] <TimeRange>
Extracted data are placed in files in the current directory. Exactly one of the -e, -h, -d, -m, record(s) extraction specifications must be used.
Extract clean data in the form of legacy “h_e” records.
Extract averaged hourly (-h), daily (-d) or monthly (-m) data in the form of a legacy-like “al_X” record, that is the “a_X” and “la_X” records concatenated together. Any data flagged as contaminated are excluded from the averages.
Direct record specification. May either be CPD2 style which are extracted from clean data or a CPD1 specification. If the CPD1 specification ends in “e” then clean data are extracted, otherwise raw data are. If the CPD1 name ends in “H” hourly averages are used, “D” daily are, or “M” monthly.
The station identifier code. For example 'brw'. Case insensitive. Optional if the station can be inferred from the working directory or environment.
The time to extract data for. It may consist of one to four arguments with interpretation inferred from the structure. The following structures are accepted:
[startYear] startDOY [endYear] endDOY [startYear] week ConvertibleStart ConvertibleEnd
If only a week is specified, then exactly one week of data is extracted. In the final case any convertible time format is accepted.
Output CPD1 headers if generating CPD1 data.
Output short form averaged data.
Change the default archive to raw for operations that do not imply an archive. This will cause requesting CPD2 records to get the raw records.
Change the default archive to clean for operations that do not imply an archive. This will cause CPD1 records to be generated from clean data.
xt2 -e mlo 10 15
xt2 -h thd 2009 10
xt -srh thd 2009 10 2009 20
xt -s -r -h thd 2009 10 2009 20
xt2 h_e,lm_ 2009Q1 2009Q2
xt2 S11a,A11a 2009 1 10