Link to USGS home
Surface Water Information--Data Scripts

loc_sensor_list

Name:
loc_sensor_list - Admin utility to list the SiteVisit location sensors for a station or group of stations

This script was retired from active support in November 2011. Functionality is now contained in the show_sensor_setup script included in the NWIS software package (see http://wwwnwis.er.usgs.gov/currentdocs/adaps/5.command_line.pdf#show_sensor_setup). The loc_sensor_list script included in the initial NWIS 4.11 OSW_Scripts package will show users the usage instructions for the new script. This page is available for historical reference only. Use of local versions of the old script without extensive testing is not recommended and the consequences are your own. If you feel this script was retired prematurely and would like to see it restored send email to GS-W OSW Scripts@usgs.gov.

Information:

The SiteVisit system of storing sensor readings and inspections works best if used in a consistent manner within a Water Science Center. This script allows WSC staff to review the setup of location sensors for a site or many sites in order to check consistency or to ensure consistency at new sites.

Usage: loc_sensor_list [-z db_no] [-a agency_cd]
-n site_no OR -f infile OR -g groupname
[-b begdt (yyyymmdd)] [-e enddt (yyyymmdd)]
[-l ingres_time_zone] [-o rdb_file_name] [-r]
where: -n specifies a single site OR
-f specifies a file containing sites (aaaannnnnnnnnnnnnnn format) OR -g specifies and Adaps group file to get sites from
-r means output rdb format instead of printed table
notes: ingres_timezone is NA-ATLANTIC, NA-EASTERN, NA-CENTRAL, NA-MOUNTAIN, NA-PACIFIC, US-ALASKA, or US-HAWAII. (Defaults to GMT if omitted)
aaaannnnnnnnnnnnnn for the -f option is the agency code (5 char) and site number (8-15 char) of each site

Sample Output:

agency_cd  site_no          loc_nu  loc_nm                parm_cd  meth_cd  sensor_nm                  start_dt              end_dt                psensr  prcrdr  stlng   serial
---------  ---------------  ------  --------------------  -------  -------  -------------------------  --------------------  --------------------  ------  ------  ------  --------------------------------------------------
USGS       01010000              0                        00020    THM04    [00020 - THM04]            1800-01-01 23:59:59   2382-12-31 00:00:00   N       Y       N       01010000                                          
USGS       01010000              0                        00065    INSD     Inside Gage                1582-01-01 23:59:59   2382-12-31 00:00:00   Y       N       N       1                                                 
USGS       01010000              0                        00065    NTRAN    Non-submersible transd.    1800-01-01 23:59:59   2382-12-31 00:00:00   N       Y       N       01010000                                          
USGS       01010000              0                        00065    OTSD     Outside Gage               1582-01-01 23:59:59   2382-12-31 00:00:00   Y       N       N       2                                                 
USGS       01010000              0                        00065    RP       Reference point            1800-01-01 23:59:59   2382-12-31 00:00:00   N       N       N       01010000A                                         
USGS       01010000              0                        00065    RP       Reference point            1800-01-01 23:59:59   2382-12-31 00:00:00   N       N       N       01010000O                                         
USGS       01010000              0                        00065    RP       Reference point            1800-01-01 23:59:59   2382-12-31 00:00:00   N       N       N       01010000B                                         

The fields in the output are as follows:

agency_cd/site_no:   the agency code and site number of the site
loc_nu/loc_nm: the ADAPS location number and name of location sensor
parm_cd/meth_cd: the parameter and method code of the location sensor
sensor_nm: the sensor name
start_dt/end_dt: the starting and ending dates of the location sensor
psensor: whether or not the location sensor is flagged as the primary reference sensor
prcrdr: whether or not the location sensor is flagged as the primary recorder
stlng: whether or not the location sensor is located in a stilling well
serial: the location sensor serial number

Script Language:
ksh, accessing the database through tsql statements

Requirements:

Original Author(s): Scott Bartholoma, NWIS

Note the original author is noted on this page for the purposes of giving credit only. Please address questions/comments to OSW (GS-W OSW Scripts@usgs.gov).

Known Problems/Limitations/Need Improvements:

Installation:
This script is part of the OSW Scripts Installation package and should be installed as part of that package. Users needing the script outside of the package should send email to GS-W OSW Scripts@usgs.gov.

NWIS 4.11 OSW Scripts package installation instructions:
http://water.usgs.gov/usgs/osw/adaps/OSW_scripts_pkg.4.11.html

Latest Verion and Release Notes:

Version 1.1: Included as part of OSW Scripts package for NWIS 4.10
-updated for NWIS 4.10
-added sensor type name
-fixed bug causing script to not look in correct directory for Adaps groups
-moved sensor_ser_no next to sensor_name and other report tweaks

Back to Scripts
[an error occurred while processing this directive]