setname - Set name of a dataset based on attributes

SYNOPSIS

setname  [ parameter=value ... ]  [ inputfile ... ]

The parameters are: template, fix_time.

DESCRIPTION

The function setname changes the name of a dataset based on the following attributes: satellite, pass_date, and start_time. The user specifies a name template, using the following rules:

    yyyy   year
    yy     year modulo 100
    mmdd   month and day
    ddd    julian day
    mm     month
    dd     day of month
    hhmm   hour (gmt) and minute
    hh     hour (gmt)
    nn     satellite number
    c      satellite character code

The above list is in order of decreasing precedence. Unrecognized characters are not replaced. The default template is yymmdd.hhmm.cnn

The / character should not be used in name templates. It may result in files being moved from their directories.

If the / character is not used in the name template, setname will not move a file from its directory. Also, setname will not change the name of a file if it would cause the deletion of another file.

After changing names, setname echoes the new file name to UNIX stdout. This enables users to assign the new name to a shell variable for later use. The following is a C shell script example in which the input file has the convenient name XX:

    set NEWNAME = `setname template=yymmdd.hhmm.cnn XX`
    if ($status != 0) exit 1
    compress $NEWNAME

PARAMETERS

template
This is the name template described above. There is no default.
fix_time
OPTIONAL. If fix_time=yes, the date and time of the middle of the image will be used in the filename. If fix_time=no, the pass_date and start_time attributes will be used instead.
The default answer is yes.

EXAMPLES

loreto%  setname /extra/jhf/new7
template       : char( 31) ? [yymmdd.hhmm.cnn]
/extra/jhf/new7: Changing to /extra/jhf/840709.2316.n07

NOTES

setname is useful as the last step in scripts that process the last acquired satellite pass.


Last Update: $Date: 1999/05/10 20:46:20 $