User's Guide

PRODGEN

Generate products.

Function:

Determines if the specified AVHRR archive image meets the criteria for any standing orders and generates the necessary product(s).

Parameters:

IN
Input image. The AVHRR archive image to be examined. If the image meets the criteria for a standing order, the required products will be created.

LOGFILE(--)
Log file. Name of the log file to append all processing messages to. LOGFILE will have the .LOG extension appended if an extension is not specified. If NULL, all processing messages will be appended to PRODGEN.LOG in the ADAPSLOG directory.

NPIXELS(25)
Number of pixels. PRODGEN calculates the latitude and longitude of a number of points around the edge of the image and determines if any of these points lie within one of the standing order product areas. NPIXELS specifies the number of pixels to skip between these test points. Smaller values will increase the number of points and, therefore, increase the accuracy and the processing time. Larger values will decrease the accuracy and processing time. See User Notes.

PROCOPT(OPS)
Processing option. PROCOPT=OPS indicates that an operator is present to assist in product generation, so all required products will be created. When PROCOPT=NO_OPS, those products that do not require an operator's assistance will be created, and the image will be copied to the /avhrr/prodgen directory on the Silo DMF if a product that requires operator assistance must be created. When PROCOPT=SILO, the image will first be retrieved from the /avhrr/prodgen directory on the SILO. Only those products that could not be previously created because an operator was not present will be generated. When PROCOPT=HOLD the image will be (1) moved to the 'hold' directory below the directory specified by IN or (2) deleted from disk if there are no products to be generated. The images within the 'hold' directory will be retained for later processing. When PROCOPT=RM the image will be removed from disk. If products need to be generated for the image, a warning message is logged to inform the operator that products will need to be generated at a later time.

  = OPS:    Operator present
  = NO_OPS: Operator not present
  = SILO:   Operator present, image being
            reprocessed from SILO
  = HOLD:   Retain image for later
            processing
  = RM:     Remove image, process
	    later from archive

Examples:

  1. LAS> prodgen in=ah11082092073192.142750

    Search through the table of standing orders to determine if the specified AVHRR archive image meets the criteria for any standing orders. By default, PRODGEN will compute the latitude and longitude of every twenty-fifth pixel around the edge of the image to determine if it overlaps an area of interest. All required products will be created. All processing messages will be written to the log file PRODGEN.LOG in the ADAPSLOG directory.

  2. LAS> prodgen in=ah11082092073192 npixels=30 procopt=no_ops

    Search through the table of standing orders to determine if the given AVHRR archive image meets the criteria for any standing orders. PRODGEN will compute the latitude and longitude of every thirtieth pixel around the edge of the image to determine if it overlaps an area of interest. Only those products that do not require operator assistance will be produced. If a product that requires operator assistance must be produced, the image will be copied to the /avhrr/prodgen directory on the silo. All processing messages will be written to the log file PRODGEN.LOG in the ADAPSLOG directory.

  3. LAS> prodgen in=ah11082092073192 logfile=prodlog procopt=silo

    Search through the table of standing orders to determine if the given AVHRR archive image meets the criteria for any standing orders. PROCOPT=silo indicates the image was previously processed by PRODGEN with PROCOPT=NO_OPS and that the image was copied to the /avhrr/prodgen directory on the silo. The user has retrieved the image from the silo and is reprocessing it to produce those products that require an operator's assistance. All processing messages will be written to the log file PRODLOG.LOG in the current working directory.

  4. LAS> prodgen in=ah11122592000000 logfile=[usr.logs]prodgen procopt=hold

    Search through the table of standing orders to determine if the given AVHRR archive image meets the criteria for any standing orders. If there are any standing orders, move the image into the 'hold' directory, otherwise delete the image from disk. All processing messages will be written to the log file [USR.LOGS]PRODGEN.LOG.

  5. LAS> prodgen in=ah11122592000000 logfile=[usr.logs]prodgen procopt=rm

    Search through the table of standing orders to determine if the given AVHRR archive image meets the criteria for any standing orders. If there are any standing orders, write a message to the log file [USR.LOGS]PRODGEN.LOG to remind the operator to generate the products at a later date using the archived image. The image is deleted from disk.

Description/Algorithm:

The standing order information stored in the file PRODGEN.TABLE in the ADAPSTABLES directory is read to determine if any of the standing orders apply to the given AVHRR archive image. To determine if the image lies within an area of interest, the latitude and longitude of every NPIXELS'th pixel around the edge of the image is computed. The window of the image that overlaps the area of interest for each order will be used to create the necessary product(s).

This function was designed to run during normal day-to-day ADAPS processing. PROCOPT indicates if an operator is present to assist in product generation, if an operator is not present, if the image is being reprocessed after being copied to the silo, if the image should be 'put on hold', or if the image should just be deleted . If an operator is present, all of the required products will be produced. If an operator is not present, usually during weekends and holidays, PRODGEN with PROCOPT=NO_OPS creates only those products that do not require an operator's assistance. If a product that requires an operator's assistance needs to be produced, the image is copied to the /avhrr/prodgen directory on the silo. When the operators return to work, these images must be retrieved from the silo, and those products requiring an operator's assistance are produced at that time using PROCOPT=silo. PROCOPT=HOLD will retain on disk those images that require product generation and delete the images that don't require product generation. This option would typically be exercised when a system critical to the generation of products is not operational. PROCOPT=RM will delete the image from disk without generating any products. If products are to be later generated for this image, the archived image must be retrieved.

Nonfatal Error Messages:

  1. [prodgen-max] Account <xxxxx>, order <yyy> was not processed

    More than 50 standing orders were found for the archive image. Account <xxxxx>, order number <yyy> was not processed. The product for this standing order must be generated manually. See PRODGEN.TABLE in ADAPSTABLES for the product to be generated.

  2. [prodgen-order] Error processing account <xxxxx>, order <yyy>

    An error occurred determining if account <xxxxx>, order number <yyy> should be processed or not.

  3. [prodgen-product] Error creating product for account <xxxxx>, order <yyy>

    An error was returned from the function called to produce the required product for account <xxxxx>, order number <yyy>. This order must be processed manually.

  4. [prodgen-unlock] Error unlocking table

    The standing order table was not unlocked properly. All functions that access this table will be unable to run until it is unlocked. Run LOCKFIL-UNLOCK on PRODGEN.TABLE in ADAPSTABLES.

Fatal Error Messages:

  1. [prodgen-alloc] Error allocating memory

    An error occurred while dynamically allocating memory. If the error persists, contact the system administrator.

  2. [prodgen-copy] Copy failed

    Copying the file to to the output directory failed. Rerun the file. If there are further problems contact the system administrator.

  3. [prodgen-env] Error retrieving <xxxxx>

    PRODGEN was unable to retrieve the value of the environment variable <xxxxx>. Ensure the variable is set appropriately.

  4. [prodgen-fatal] Fatal error encountered

    A fatal error was encountered. The error message displayed prior to this one is the specific error that was encountered.

  5. [prodgen-header] Error reading header for <xxxxx>

    An error occurred while reading the header file for the specified archive image. Ensure the header file exists.

  6. [prodgen-herr] Error executing HOLD processing option

    An error occurred while executing the 'hold' processing option. If the error persists, contact the system administrator.

  7. [prodgen-host] Product <xxx> can only be made on edcsgs20

    Product number <xxx> in the prodgen table can only be created on edcsgs20 - this is where the disks for this product are mounted. Please, log into this machine and rerun the process.

  8. [prodgen-info] Error reading the standing order table

    An error occurred reading the standing order table. To ensure the table is in the correct format, contact the system administrator.

  9. [prodgen-mk1b] Mklevel1b-line of <xxxx> failed

    Failed to make level1b format of image. If error persists contact system administrator.

  10. [prodgen-nolock] Unable to lock table

    PRODGEN was unable to lock the standing order table. The table may be locked by another user. If the error persists, contact the system administrator.

  11. [prodgen-output] Output directory for product 300 or 301 is NULL.

    In prodgen.table the output directory was not specified. It was --. Please, correct the prodgen.table. See PRODEDIT's User Note 4 for more infomation.

  12. [prodgen-pass] Error sending variables to TAE

    An error occurred sending variable values back to TAE. If the error persists, contact the system administrator.

  13. [prodgen-pcode] Unknown product code <xxx>

    An unknown product code was encountered in the standing order table. Ensure the correct product code has been entered in the table. Use PRODEDIT to inspect or correct any errors in the standing orders table.

  14. [prodgen-pts] Error selecting points

    An error was encountered selecting the test points along the edge of the AVHRR archive image. Re-run the function and, if the error persists, contact the system administrator.

  15. [prodgen-rm] Error executing RM processing option

    An error occurred while executing the 'rm' processing option. If the error persists, contact the system administrator.

  16. [prodgen-udir] Error determining silo path

    An error occurred determining the Silo DMF path name. If the error persists, contact the system administrator.

User Notes:

  1. PRODGEN was designed to be used in ADAPS processing to automatically generate products as data is received, processed, and archived. PRODGEN reduces the need for human intervention when an order is placed for an area of interest over an extended period of time.

    Once a standing order is entered into the table using PRODEDIT, all AVHRR data that is processed from that point on will be analyzed to determine if it meets the criteria for the order. Standing orders should be removed from the table on a timely basis when they expire.

  2. While PRODGEN may be run manually to produce all of the standing order products for a single AVHRR archive image, the function was designed to be run on each image as it is processed through ADAPS. PRODGEN_DAEMON continually monitors the prodgen subdirectory of ADAPSARC and calls PRODGEN to produce the necessary products for each image in this directory. Once the products have been created, the images are removed.

  3. NPIXELS specifies the number of pixels to skip between test points around the specified image. These test points are used to determine if an AVHRR archive image overlaps an area of interest. Smaller values will increase accuracy and processing time, while larger values will decrease accuracy and processing time.

  4. When PROCOPT=HOLD is specified, a directory called 'hold' must exist below the directory specified by IN. This directory will be used to retain scenes until they can be processed at a later date.

  5. The standing order table is called PRODGEN.TABLE and is located in the ADAPSTABLES directory. See PRODEDIT for the listing, generation, and maintenance of this table.

  6. Associated functions are ADAPSTOP, PRODEDIT, PRODGEN_DAEMON. and SILO. The SILO function is used to read and write images to the silo. Note that the silo is also known as the silo.