dcsin - Creates DCS datasets from HRPT telemetry data.

SYNOPSIS

dcsin  [ parameter=value ... ]  [ outputfile ... ]
dcsin  [ parameter=value ... ]  [ directory ]

Parameters are: on_pass_disk, tape_device, pass_number, files_per_pass, pass_year, dcs_ident_file, shift_extended, max_time_adj, hrpt_format.

DESCRIPTION

dcsin creates TeraScan DCS (Data Collection System) datasets from raw HRPT telemetry data. Input telemetry data can be read from the pass disk, tape, or standard UNIX files. Multiple passes on tape or the pass disk can be processed at once.

Output datasets contain the following variables:

date - The date the message was received.

time - The time the message was received.

platform_id - The identification number of the message sender

dcs_doppler - The unprocessed DCS doppler shift numbers. It is used to compute position.

dcs_quality - The message quality. 0 indicates a good value. 1 indicates questionable data.

dcs_count - The number of 4 byte quantities in dcs_data. It ranges between 0 and 7.

dcs_data - The unprocessed DCS message.

Platform latitude, longitude and elevation variables are added by the dcsloc function.

Platform id's are issued to platform owners by Service Argos. The encoding of these id's in DCS messages has evolved as the number of platforms has increased. Originally, platform id's were 20-bit, which included 14 identifier bits and 6 check bits. Next, Argos effectively doubled the number of id's, by re-allocating the 20-bits into 15 identifier bits and 5 check bits. The latest change implemented by Service Argos allows 28-bit id's, with a block of 16 extended id's to be generated for each old 20-bit id; this requires 8 bits, formerly used for message data, to be used as added identifier and check bits.

There are no input TeraScan datasets. The sources of input data are described above. Output is either to a user-supplied directory name or a user-supplied list of dataset names. If a directory name is entered, output dataset names will automatically be generated in the output directory. The format of the output file names is n#.yyddd.hhmm, where # is the NOAA satellite number, yyddd is the julian date, and hhmm is the start hour and minute of the output dataset.

PARAMETERS

on_pass_disk

Answer yes if the input is from the pass disk, or no if the input is from tape or standard UNIX disk file.

Valid responses are [yes or no]. The default is no.

tape_device

If on_pass_disk=no, this is the name of the input tape device or UNIX disk file. Tape device names are machine specific. For example, the following devices are commonly used on the Sun SPARC Station:

  /dev/nwd0  - DAT, fixed blocking, APUNIX driver
  /dev/nrwd0 - DAT, variable blocking, APUNIX driver
  /dev/nsx0  - 8mm, fixed blocking, APUNIX driver
  /dev/nrwd0 - 8mm, variable blocking, APUNIX driver
  /dev/nrmt0 - 8mm or CCT, variable blocking, SUN driver

All of the above device names imply no rewind on close.

The default is extracted from the UNIX environment variable TAPE. Only tape devices listed in the file $PASSDIR/devtable, or simple UNIX disk files, are accepted.

pass_number

This specifies the number(s) of the pass(es) to process, when input is from either tape or the pass disk. Passes are numbered starting with 1. Input tape is always assumed to be positioned at the first pass.

Valid responses for input from the pass disk are [1 to maximum number of passes that can be stored on your pass disk (see lspass(1))]. The default response is the number of the last acquired pass.

Valid responses for input from tape are [1 to 100]. The default response is 1.

files_per_pass

If input is from tape, this is the number of tape files per pass. If files_per_pass=2, then each pass is assumed to consist of a header file, followed by a data file. If files_per_pass=1, then the tape is assumed not to have any header files.

Valid responses are [1 or 2]. The default response is 2.

pass_year

If on_pass_disk=no, this is the year that the pass was collected. All passes processed in one execution of dcsin must have the same year.

The valid range is [>=1970]. The default is [1990].

dcs_ident_file

This parameter identifies the ASCII lookup table for computing extended 28-bit DCS platform id's. This file contains a list of 20-bit platform id's, along with their corresponding block number. Optionally, the first non-blank/non-comment line in this file can contain 16 checkbits numbers used in the following algorithm.

The algorithm for extending platform id's is as follows:

	- Extract normal 20-bit platform id from DCS message header
	- Lookup this platform id in the dcs_ident_file
	- If platform id does not appear, assume platform id is not an extended id
	- If platform id does appear, get the corresponding block number
	- Next, look at the 3rd and 4th 4-bit nibbles in the data message itself
	- If checkbits[ 3rd nibble ] != 4th nibble, no platform id can be computed
	- Otherwise, extended platform id = 32768 + 16 * block number + 3rd nibble
  

Each unused/unallocated old 20-bit platform id can be used to generate 16 new extended id's. The following is a trivial example of a valid dcs_ident_file. Lines that begin the # are ignored:

	# Fake set of checkbits nibbles
	# The real set of checkbits nibbles should be hard coded into dcsin
	#  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
	   0  2  4  6  8 10 12 14  1  3  5  7  9 11 13 15
	#
	# old-20-bit-id    corresponding-block-number
	       2                       15
               4                       64
   

shift_extended

This parameter is used only if the user has specified a dcs_ident_file. This parameter indicates whether or not to remove the two DCS data 4-bit nibbles associated with extended 28-bit platform id's. If yes, which is the default, the data nibbles are shifted left as follows. The first nibble out of every 6 is not shifted; it normally refers to the DRU that recovered the data message:

  before shift: zabcde zfghij zklmno zpqrst ...
  after  shift: zadefg zhijkl zmnopq zrstuv ...
  

max_time_adj

[ OPTIONAL ] This parameter determines the maximum time difference allowed between the time embedded in the telemetry and that stored when the pass was received and written to disk. For example, if max_time_adj=30 then whenever there is a difference between these two times of less than 30 seconds the stored time is used rather than the telemetry time.

The valid range is [>=0]. The default is 0. This implies that the telemetry time will always be used. This parameter must be explicitly set on the command line.

hrpt_format

OPTIONAL. This parameter defines the format of the raw telemetry to be read. See hrptin NOTES for a list of these formats.

The default is auto, which stands for auto-sensing. This parameter must be explicitly specified on the command line.

EXAMPLES

Extract a TeraScan DCS dataset named hugo.dcs from a pass archived on tape. Note that parity errors are common at the beginning and end of the pass when the satellite is low on the horizon.

[1] % dcsin hugo.dcs
on_pass_disk   : char(  3) ? [yes] no
tape_device    : char(255) ? [/dev/nwd0]
pass_number    : int (100) ? [1]
files_per_pass : int       ? [2]
pass_year      : int       ? [1990] 1989
dcs_ident_file : char(255) ?
/dev/nwd0: Processing pass 1
hugo.dcs starts at time 18:42:43.422, sample 1.
DCS parity error at line 93
DCS parity error at line 99
DCS parity error at line 108
DCS parity error at line 252
DCS parity error at line 258
DCS parity error at line 261
DCS parity error at line 279
DCS parity error at line 381
DCS parity error at line 4275
DCS parity error at line 4281
DCS parity error at line 4347
DCS parity error at line 4563
DCS parity error at line 4584
DCS parity error at line 4662
DCS parity error at line 4665
DCS parity error at line 4687
DCS parity error at line 4689

[2] % contents hugo.dcs
printout        : char( 3) ? [no]

hugo.dcs  Contents  Page 1

Dimensions:
   1         902
   2          40

Global Attributes:
  history          byte
  projection       long    std_projection   sensor_scan
  et_affine        double                   1 0 0 1 0 0
  satellite        byte                     noaa-11
  sensor           long    std_sensor       avhrr
  pass_date        long    std_date         89/09/21
  start_time       double  std_time         18:42:43.422
  time_adjust      double  std_time         00:00:00
  attitude         double  degrees          0 0 0
  sensor_tilt      double  degrees          0
  sensorient       double  degrees          0 45 0 55.3 -55.3
  scan_samples     long                     2048
  scan_rates       double                   6 40000 37.6991
  orb_elem_date    long    std_date         89/09/21
  orb_elements     double                   0.134118 0.827972 0.0005 0.0012184
                             0.903569 0.577092 0.274849
  center_lat       double  std_latitude
  center_lon       double  std_longitude
  map_angle        double  degrees

Variable Attributes:

Variables:

  date             long    std_date
     1         902

  time             double  std_time
     1         902

  platform_id      long
     1         902

  dcs_doppler      long
     1         902

  dcs_quality      long
     1         902

  dcs_count        long
     1         902

  dcs_data         byte
     1         902
     2          40

FILES

orbdata, devtable

SEE ALSO

dcs, dcsloc, dcslist, dcsmix, avin, hrptin

NOTES

See hrptin NOTES to the see the input record formats supported by dcsin.


Last Update: $Date: 2002/05/07 23:19:42 $