Software Tools Operations Guide

DEOS Technical Note #24

Dr. Geoffrey E. Quelch

Research Fellow,
University of Delaware,
Center for Climatic Research


   University of Delaware
   NewarkDE 19716
   
  

Version 2

All material herein is copyright by the Delaware Environmental Observing System

Published: April 11th 2006

Revision History
Revision 1.12006/04/11GEQ
Initial version.
Revision 1.22006/07/13GEQ
Added id for external linking. Added comment about /dev/null. Clarified disposition of metadata.
Revision 2.12006/09/26GEQ
Incremented version number of this document to 2.
Revision 2.22006/12/22GEQ
Added graphic option.
Revision 2.32007/06/08GEQ
Added dgep program and description.
Revision 2.42007/08/02GEQ
Added description of available graphical output.
Revision 2.1.42007/09/21GEQ
Added dmgen (DPA Mask Generator) program. Added apply mask option to dpa_extract program.
Revision 2.1.62008/01/24GEQ
Revised and corrected dmgen (DPA Mask Generator) program options.

Table of Contents

Introduction
Running the dpa_extract Program
Command Line Options for the dpa_extract Program
Input Option
Filename Option
Graphic Option
Apply Mask Option
User Option
Password Option
Database Option
Station Name Option
Verbose Option
Help Option
Output File Format
Running the dgep Program
Command Line Options for the dgep Program
User Option
Password Option
Database Option
Network Name Option
Station Name Option
Month Number Option
Verbose Option
Help Option
Running the dmgen Program
Command Line Options for the dmgen Program
User Option
Password Option
Database Option
Station Name Option
Directory Option
Verbose Option
Help Option

Introduction

This document describes the software tools available as part of the SMARTS component of the DEOS system.

Running the dpa_extract Program

The dpa_extract program extracts the data from a DPA file and prints out the contents. The precipitation data is either printed to the screen or written to a file depending on the command line options in effect. If no precipitation data is needed, then printing to /dev/null may be used. The metadata is always written to the screen and never to the output file.

A graphical representation of the data may be generated, but this image does not have any geographical underlay components.

The umbrella mask, stored in the database, may be applied to the data, and missing cells corrected. Additional command line options are required to perform this action.

The program is executed by the command dpa_extract from the command line.

dpa_extract { -i input-file-name | --input input-file-name } [ -f output-file-name | --filename output-file-name ] [ -g graphic-file-name | --graphic graphic-file-name ] [ -a | --apply-mask ] [ -u user-name | --user user-name ] [ -p password | --password password ] [ -d database | --database database ] [ -S station | --station-namestation ] [ -v value | --verbose value ] [ -h | --help ]

Command Line Options for the dpa_extract Program

The dpa_extract program requires an input DPA file name and can use an optional data output file for the precipitation data. The output data format is described below. If the apply mask setting is given then the database conenction paramters and the station name must be provided.

Input Option

The specification for the input option is:

{ -i name | --input name | --input=name }

This option specifies an input item, typically a file name.

Filename Option

The specification for the filename option is:

[ -f filename | --filename filename | --filename=filename ]

This option specifies a file name for output.

Graphic Option

The specification for the graphic option is:

[ -g graphic-file-name | --graphic graphic-file-name | --graphic=graphic-file-name ]

This option specifies a file name for generating a graphic image.

Apply Mask Option

The specification for the apply mask option is:

[ -a | --apply-mask ]

This option indicates the user wants to applythe stations's umbrella mask to the file in question. This option, if present, requires the station name and database connections to be provided to get the mask.

User Option

The specification for the user option is:

{ -u username | --user username | --user=username }

This option will allow the program to connect to the database using the username provided. The user must already exist, and have sufficient permissions to access the database specified. This item is required.

Password Option

The specification for the password option is:

{ -p password | --password password | --password=password }

This option in combination with the username allows the program to connect to the database using the username provided. This item is required.

Database Option

The specification for the database option is:

{ -d database | --database database | --database=database }

This option will specify which database the program should use as a source of data, configuration items and a destination for any event logging items. This item is required.

Station Name Option

The specification for the station name option is:

[ -S name | --station-name name | --station-name=name ]

This option specifies the station name to be processed. If the name is missing, all stations for the network will be processed.

Verbose Option

The specification for the verbose option is:

[ -v value | --verbose value ]

The value provided for the verbose setting (a digit between 0 and 5) indicates how much output is generated, 0 being minimal and 5 being extremely verbose. Positive values of setting send data to the ELF, negative value also print the message to the screen. If no value is provided, the setting is assumed to be 1.

Help Option

The specification for the help option is:

[ -h | --help ]

This option prints a summary of all the command line options and exits.

Output File Format

The dpa_extract program generates precipitation data as given in this section.

  • Data records (lines) are comma separated values of the following data.

    • Latitude (in decimal degrees)

    • Longitude (in decimal degrees)

    • Value (in mm)

Running the dgep Program

The dgep program extracts data from the database and generates the DEOS Green Energy Product. This is generated as a table of values for "bins" of combinations of solar radiation values and wind speeds. See this information on the Green Energy Program for the state of Delaware.

The program is executed by the command dgep from the command line.

dgep { -u user-name | --user user-name } { -p password | --password password } { -d database | --database database } { -n network | --network-namenetwork } { -S station | --station-namestation } [ -m value | --monthvalue ] [ -v value | --verbose value ] [ -h | --help ]

Command Line Options for the dgep Program

The dgep program requires an input station name and network name. Data will be generated for the entire year unless the month option is provided on the command line.

User Option

The specification for the user option is:

{ -u username | --user username | --user=username }

This option will allow the program to connect to the database using the username provided. The user must already exist, and have sufficient permissions to access the database specified. This item is required.

Password Option

The specification for the password option is:

{ -p password | --password password | --password=password }

This option in combination with the username allows the program to connect to the database using the username provided. This item is required.

Database Option

The specification for the database option is:

{ -d database | --database database | --database=database }

This option will specify which database the program should use as a source of data, configuration items and a destination for any event logging items. This item is required.

Network Name Option

The specification for the network name option is:

{ -n network name | --network-name network name | --network-name=network name }

This option specifies the network name and is required.

Station Name Option

The specification for the station name option is:

[ -S name | --station-name name | --station-name=name ]

This option specifies the station name to be processed. If the name is missing, all stations for the network will be processed.

Month Number Option

The specification for the month number option is:

[ -month value | --month value | --month=value ]

This option specifies the month number for which to generate data. If no month number is provided data is processed for all months.

Verbose Option

The specification for the verbose option is:

[ -v value | --verbose value ]

The value provided for the verbose setting (a digit between 0 and 5) indicates how much output is generated, 0 being minimal and 5 being extremely verbose. Positive values of setting send data to the ELF, negative value also print the message to the screen. If no value is provided, the setting is assumed to be 1.

Help Option

The specification for the help option is:

[ -h | --help ]

This option prints a summary of all the command line options and exits.

Running the dmgen Program

The dmgen program extracts the data mask from a DPA file or set of DPA files and stores the resulting masks in the database for those stations.

The program is executed by the command dmgen from the command line.

dmgen { -u user-name | --user user-name } { -p password | --password password } { -d database | --database database } [ -S station | --station-namestation ] { -D value | --directoryvalue } [ -v value | --verbose value ] [ -h | --help ]

Command Line Options for the dmgen Program

The dmgen program requires an input directrory name and an optional station name. For the stations requested the program will generate and store the DPA file mask.

User Option

The specification for the user option is:

{ -u username | --user username | --user=username }

This option will allow the program to connect to the database using the username provided. The user must already exist, and have sufficient permissions to access the database specified. This item is required.

Password Option

The specification for the password option is:

{ -p password | --password password | --password=password }

This option in combination with the username allows the program to connect to the database using the username provided. This item is required.

Database Option

The specification for the database option is:

{ -d database | --database database | --database=database }

This option will specify which database the program should use as a source of data, configuration items and a destination for any event logging items. This item is required.

Station Name Option

The specification for the station name option is:

[ -S name | --station-name name | --station-name=name ]

This option specifies the station name to be processed. If the name is missing, all stations for the network will be processed.

Directory Option

The specification for the directory option is:

{ -D dirname | --directory dirname | --directory=dirname }

This option specifies a directory name. The value is required.

Verbose Option

The specification for the verbose option is:

[ -v value | --verbose value ]

The value provided for the verbose setting (a digit between 0 and 5) indicates how much output is generated, 0 being minimal and 5 being extremely verbose. Positive values of setting send data to the ELF, negative value also print the message to the screen. If no value is provided, the setting is assumed to be 1.

Help Option

The specification for the help option is:

[ -h | --help ]

This option prints a summary of all the command line options and exits.