Metadata Loading Programs: Operations Guide

DEOS Technical Note #8

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: March 5th 2004

Revision History
Revision 1.12004/03/05GEQ
Initial version
Revision 1.22004/12/15GEQ
Data file format adds time zone difference from GMT.
Revision 1.32004/12/17GEQ
Added sdu program description.
Revision 1.42005/02/02GEQ
Added table describing station and grid loading options.
Revision 1.52005/10/20GEQ
Added local settings column to station metadata settings table.
Revision 1.62006/01/24GEQ
Added DelDOT network. Clarified network names and added a hyperlink target to the names section. Fixed error in HRAP topography filename.
Revision 1.72006/05/05GEQ
Added City and County descriptions.
Revision 1.82006/05/08GEQ
Cleaned up structure of file.
Revision 1.92006/05/11GEQ
Added usgs_counties.sql file to USGS streamflow setup.
Revision 1.102006/07/13GEQ
Added metar stations county data installation. Clarified in first table, which file contains County data.
Revision 2.12006/09/26GEQ
Incremented version number of this document to 2.
Revision 2.22006/12/05GEQ
Added DGS well network.
Revision 2.32007/01/16GEQ
Corrected name for DGS wells station metadata.
Revision 2.42007/06/18GEQ
Added DNERR networks.
Revision 2.52007/07/27GEQ
Added USACE networks.
Revision 2.1.82010/01/31GEQ
Added NOS network. Changed numbering to match code version.
Revision 2.1.112011/03/20GEQ
Added soil location metadata loading program. Added DNREC WQ network.
Revision 2.2.12012/04/29GEQ
Added convenience scripts for station, topography and miscellaneous loading.
Revision 2.2.22012/07/28GEQ
Added DBOFS network.

Abstract

This technical note describes the programs to load station, topographical, City and County metadata.


Table of Contents

Introduction
Networks Supported
Projections Supported
Metadata Loading Programs
All Station Convenience Script
Base Station Metadata
Enhanced Station Metadata
All Metadata Convenience Script
City Metadata
County Metadata
METAR Station County Metadata
All Topography Convenience Script
Topography Metadata

Introduction

This technical note describes the programs available to the DEOS systems administrator to load system metadata. Described herein are the station metadata loading program sdi, enhanced station metadata loading sdu and the topographical information loading program tdi. In addition, a convenience script install-all.sh is described.

Networks Supported

The DEOS system supports a number of different network data retrieval, ingest and display. The following table summarizes the information for these networks and options needed for loading the data.

Table 1. Network Station Metadata

NetworkNumberLocation TypeMetadata FilenameLocal Settings [a]Description
NWS31metar_meta.txtdeos_data.sqlThe NWS METAR network is the only one so far to have enhanced station data available for ingesting using the sdu program. This data is in file StnSummary.txt. The station County data is added utilizing the program described in the METAR station county metadata ingest section.
NIDS51radar_meta.txtnexrad_data.sqlNEXRAD radar products, primarily the digital precipitation array (DPA).
DEOS71deos_metadata.txtdeos_data.sqlThe local settings file contains DEOS station County data.
USGS-Streamflow85usgs-stream.txtusgs_water_data.sql and usgs_counties.sqlThe usgs_counties.sql contains County data.
USGS-Tidal96usgs-tidal.txtusgs_water_data.sql and usgs_counties.sqlThe usgs_counties.sql contains County data.
RAWS101raws_metadata.txtraws_data.sqlNWS fire weather network
NDBC117ndbc_metadata.txtndbc_data.sqlBuoy network
DelDOT121deldot_metadata.txtdeldot_data.sqlDelaware Department of Transport network. The local settings file contains County data.
DGS-Wells131dgs_wells_metadata.txtdgs_data.sqlDelaware Geological Survey well network. The local settings file contains County data.
DNERR-Water-Quality149dnerr_metadata.txtdnerr_data.sqlDelaware National Estuarine Research Reserve water quality station network. The local settings file contains County data.
DNERR-Buoy157dnerr_buoy_metadata.txtdnerr_buoy_data.sqlDelaware National Estuarine Research Reserve buoy network.
USACE-Buoy167usace_buoy_metadata.txtusace_buoy.sqlUS Army Corps of Engineers buoy network.
NOS177nos_metadata.txtnos_data.sqlNOS network.
DNREC-Water-Quality189DNREC_WQ-Stations.txtDNREC_WQ_data.sql and DNREC_WQ_county.sqlDNREC water quality station network.
DBOFS198DBOFS_metadata.txtdbofs_data.sqlDBOFS station network.

[a] These settings are probably only useful for University of Delaware installations.

Projections Supported

The DEOS system supports a number of different grid projections. The following table summarizes the information for these projections and options needed for loading the data.

Table 2. Projections Metadata

GridNumberMetadata FilenameDescription
HRAP0hrap_topo.txtHydrological Rainfall Applications Project, or 1/40 LFM.
DEOS1deos_topo.txt 

Metadata Loading Programs

The following sections describe the metadata loading programs of the DEOS system.

All Station Convenience Script

The program is executed by the command install-all.sh from the command line.

Command Execution

install-all.sh DB_USER DB_PASSWORD DB_NAME

Base Station Metadata

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

Command Execution

sdi { -u user-name | --user user-name } { -p password | --password password } { -d database | --database database } { -D directory | --directory directory } { -f filename | --filename filename } {--network-number value} {--location-type value} {--address-desc text} {--location-desc text}

Command Line Options

The sdi program takes the command line options as described below.

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.

Input File Format

The sdi program assumes that the input file conforms to the description given in this section.

  • The first line of the file is a comment line.

  • Subsequent lines are assumed to be tab-delimited fields of the following data.

    • Station ID

    • Latitude (in Radians)

    • Longitude (in Radians)

    • Elevation (in Meters)

    • Standard Time Difference from GMT (in Hours)

    • State

    • City

Database Population

The sdi populates the following database tables.

Addresses

This table contains address data for the station. Ingested data from the input file includes:

  • City

  • State

Locations

This table contains location data for the station. Ingested data from the input file includes:

  • Latitude

  • Longitude

  • Elevation

Stations

This table contains station metadata for the station. Ingested data from the input file includes:

  • Station Name

  • Network ID

Operational Use

For operational use, it is expected that the station metadata loading program only be used at initial system setup, or after the addition of a new network.

Enhanced Station Metadata

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

Command Execution

sdu { -u user-name | --user user-name } { -p password | --password password } { -d database | --database database } { -D directory | --directory directory } { -f filename | --filename filename }

Command Line Options

The sdu program takes the command line options as described below.

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.

Input File Format

The sdu program assumes that the input file conforms to the description given in the stations listing file.

Database Population

The sdu populates the following database tables.

Locations

This table contains location data for the station. Ingested data from the input file includes:

  • Time_Zone_Offset

Operational Use

For operational use, it is expected that the station metadata loading program only be used at initial system setup, or after the addition of a new network but may be used if new stations are added to an existing network or the file has significant alterations.

All Metadata Convenience Script

The program is executed by the command install-all.sh from the command line.

Command Execution

install-all.sh DB_USER DB_PASSWORD DB_NAME

City Metadata

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

Command Execution

city_ingest { -u user-name | --user user-name } { -p password | --password password } { -d database | --database database } { -f filename | --filename filename } [ -k value | --skip=value ]

Command Line Options

The city_ingest program takes the command line options as described below.

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.

Input File Format

The city_ingest program assumes that the input file conforms to the description given in this section.

  • The first line of the file is a comment line.

  • Subsequent lines are assumed to be comma-delimited fields of the following data, fields beyond the first two are ignored.

    • City description in double quotes

    • City name

    • State name

Database Population

The city_ingest populates the following database tables.

Cities

This table contains location data for the station. Ingested data from the input file includes:

  • City name

  • State name

Operational Use

For operational use, it is expected that the city metadata loading program only be used at initial system setup, or after the addition of a new projection and associated grid.

County Metadata

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

Command Execution

county_ingest { -u user-name | --user user-name } { -p password | --password password } { -d database | --database database } { -f filename | --filename filename } [ -k value | --skip=value ]

Command Line Options

The county_ingest program takes the command line options as described below.

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.

Input File Format

The county_ingest program assumes that the input file conforms to the description given in this section.

  • The first line of the file is a comment line.

  • Subsequent lines are assumed to be comma-delimited fields of the following data, fields beyond the first two are ignored.

    • County name

    • State name

Database Population

The county_ingest populates the following database tables.

Counties

This table contains location data for the station. Ingested data from the input file includes:

  • County name

  • State name

Operational Use

For operational use, it is expected that the county metadata loading program only be used at initial system setup, or after the addition of a new projection and associated grid.

METAR Station County Metadata

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

Command Execution

metar_county { -u user-name | --user user-name } { -p password | --password password } { -d database | --database database } { -f filename | --filename filename } [ -k value | --skip=value ]

Command Line Options

The metar_county program takes the command line options as described below.

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.

Input File Format

The metar_county program assumes that the input file conforms to the description given in this section. This file is called metadata/Export_XYmetar_meta_wCounty.csv.

  • The first line of the file is a comment line.

  • Subsequent lines are assumed to be comma-delimited fields of the following data, fields beyond those mentioned are ignored.

    • Not used

    • Station Identifier

    • Not used

    • Not used

    • Not used

    • Not used

    • Not used

    • Not used

    • State Abbreviation

    • Not used

    • Not used

    • County Name

Database Population

The metar_county populates the following database tables.

Locations

This table contains location data for the station. Ingested data from the input file includes:

  • County name

  • State name

Operational Use

For operational use, it is expected that the METAR station county metadata loading program only be used at initial system setup, or after the upgrade to version 1.3.1 of the system.

All Topography Convenience Script

The program is executed by the command install-all.sh from the command line.

Command Execution

install-all.sh DB_USER DB_PASSWORD DB_NAME

Topography Metadata

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

Command Execution

tdi { -u user-name | --user user-name } { -p password | --password password } { -d database | --database database } { -D directory | --directory directory } { -f filename | --filename filename } { --projection-number value | --projection-number=value }

Command Line Options

The tdi program takes the command line options as described below.

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.

Input File Format

The tdi program assumes that the input file conforms to the description given in this section.

  • The first line of the file is a comment line.

  • Subsequent lines are assumed to be tab-delimited fields of the following data.

    • Grid cell X value

    • Grid cell Y value

    • Elevation (in Meters)

    • Latitude (in Radians)

    • Longitude (in Radians)

Database Population

The tdi populates the following database tables.

Locations

This table contains location data for the station. Ingested data from the input file includes:

  • Latitude

  • Longitude

  • Elevation

Stations

This table contains station metadata for the station. Ingested data from the input file includes:

  • Projection Number

  • X cell coordinate

  • Y cell coordinate

Operational Use

For operational use, it is expected that the topographical metadata loading program only be used at initial system setup, or after the addition of a new projection and associated grid.