IRIS Home  
site map contact search  
data software stations and instrumentation  
You are here: IRIS > Software and Manuals > NetDC
 

NetDC manual [ back ] [ forward ]


6.0 INVENTORY (.INV) REQUESTS

Inventory requests ask for information regarding the data holdings of a particular data center. The information can generally be extracted from a database but the source of data may also be a flat file index or a filesystem directory tree. Inventory data is provided in a standard ASCII format and can generally be forwarded to the requesting user directly through email.

Local processing begins with the "inventory.request" file being fed to the function "local_inventory()", where the data is queried and returned. The request file is laid out as a series of request lines, like the example below:

.INV *
.INV GEOFON *
.INV GEOFON AA B*
.INV GEOFON AA TATO * *
.INV * IU ANMO * * "1995 03 03 02 24 01.3" "1995 03 03 07 00 30.0"
.INV * II KIV * "BHE BHN BHZ" "1996 05 01 00 00 00.0" "1996 05 01 05 00 00.0"

Looking at these sample inventory requests, you'll notice that some of the request lines have less than the total number of fields filled in. Some omit the start and end time, some exclude the channel and location, and still others leave out the station and network. What this illustrates is the inventory request's unique ability to accept a variable number of field entries which will determine how much information is returned. More will be explained in the output examples below.

"process_inv", the inventory interface routine, is called from "local_inventory()" supplying the following parameters, followed by the contents of the file "inventory.request":

.NAME (the name of the requesting user)
.EMAIL (the email address of the requesting user)
.HUB_ID (the assigned ID tag of the netdc_request)
.LABEL (the label of the netdc_request)
.DISPOSITION_USER (how to deliver output to the user)
.DISPOSITION_HUB (how to deliver output to the hub data center)
.FILENAME (the filename where the output will be placed)

This header information allows NetDC to know how to deliver the output once it has been constructed. "process_inv" must take each request line and form a query to the local information base. As the query is passed, it should in some fashion extract the output and filter the information into the output format shown below:

<REQUEST LINE 1>
[<LIST CONTENT DESCRIPTION 1>]
[<HEADER LINE 1>]
<line 1>
<line 2>
< .... >
[<LIST CONTENT DESCRIPTION 2>]
[<HEADER LINE 2>]
<line 1>
<line 2>
< .... >
[...]

<REQUEST LINE 2>
[<LIST CONTENT DESCRIPTION 1>]
[<HEADER LINE 1>]
<line 1>
<line 2>
< .... >
...etc...

The REQUEST LINE displays the inventory request line being processed. This helps associate the inventory output with the query that triggered it. The LIST CONTENT DESCRIPTION indicates what kind of list follows. This description can be one of the following:

AVAILABLE DATA CENTERS
AVAILABLE SEISMIC NETWORKS
AVAILABLE STATIONS
AVAILABLE LOCATIONS
AVAILABLE CHANNELS
AVAILABLE WAVEFORM DATA

Following this is the HEADER LINE, which can vary depending on the content listing. This is a standard text line that gives the user a quick reference to what the fields stand for, much like a table header.

Each of the lines afterward contain the records that fit the query criteria. There can be zero lines, one line, or many lines of output, depending on the query and the matching elements.

For each request line there can be many of these "content blocks" consisting of description, header, and data lines. The arrangement of these blocks is recursive in nature, meaning that a single category is exhaustively described down through all of its subcategories before going to the next category. In other words, when printing information on a network, the next block of information will be on the first station of the network and the block after will be on the first location or channel of that station, and so forth. This arrangement helps link subcategories to their parent categories. A given channel is unmistakably part of the previously listed station, which is a part of the previously listed network, etc.

The following are examples showing what output a user could expect to see from various inventory requests. Carefully note the format of each request, since inventory requests can be made with a variable number of fields, depending on how much information is desired.

In this first example, a query for available data centers comes back with a report with lines pulled directly out of the local routing table. The query is made by placing a wildcard in the DC_NAME field, with no other request fields specified. In the output, the fields are contained within double-quotes and space-separated. The field names are indicated just below the title. The <cr> pertains to where a carriage return would be.

.INV *<cr>
[AVAILABLE DATA CENTERS]<cr>
[NETCODE DC_NAME PRIORITY EMAIL INST_NAME ADDRESS CONTACT PHONE CONTACT_EMAIL PEAK_MERGE_KB VERSION]<cr>
"GE" "GEOFON" "PRIMARY" "netdc@gfz-potsdam.de" "GFZ Potsdam" "GFZ, Telegrafenberg A6, D-14473, Potsdam, Germany" "Winfried Hanka" "49-331-288-1213" "hanka@gfz-potsdam.de" "2048" "1.4"<cr>
"G" "GEOSCOPE" "PRIMARY" "netdc@ipgp.jussieu.fr" "Institut de Physique du globe de Paris" "Department de Sismologie, Programme GEOSCOPE, 4, Place Jussieu, 75252 Paris cedex 05, France" "Genvieve Roult" "33 1 44274888" "groult@ipgp.jussieu.fr" "1024" "2.0"<cr>
"IU" "IRIS_DMC" "PRIMARY" "netdc@iris.washington.edu" "IRIS Data Management Center" "1408 NE 45th St., Ste. 201, Seattle, WA 98105" "Tim Ahern" "(206) 547-0393" "tim@iris.washington.edu" "500" "1.6"<cr>
"BK" "NCEDC" "PRIMARY" "netdc@quake.seismo.berkeley.edu" "Northern California Earthquake Data Center" "Seismographic Station, Earth Sci. Bldg., Univ. of California, Berkeley, CA 94720" "Douglas Neuhauser"
"(510) 642-0931" "doug@seismo.berkeley.edu" "400" "3.8"<cr>
<cr>

This next example shows a list of available networks. This occurs when the network field is filled with a wildcard or requested network code. In this case, the database at the PRIMARY site provides the data. Information on the data center from the routing table is not included in such a query.

.INV * IU<cr>
[AVAILABLE NETWORKS]<cr>
[NET_CODE NETWORK_NAME OPERATORS COMMENTS]<cr>
"IU" "IRIS/USGS" "Albuquerque Seismic Laboratory" ""<cr>
<cr>

A list of available stations will show the station name and related information, including the effective time. Note that more than one entry can exist for a given station in the case of having more than one effective time, as illustrated in the example below (values may be hypothetical). It is conventional to represent an open-ended end time with a very large value, such as 2500,365,23:59:59.9999.

.INV GEOSCOPE G *<cr>
[AVAILABLE NETWORKS]<cr>
[NET_CODE NETWORK_NAME OPERATORS COMMENTS]<cr>
"G" "GEOSCOPE" "IPGP" ""<cr>
<cr>
[AVAILABLE STATIONS]<cr>
[STATION LATITUDE LONGITUDE ELEVATION DESCRIPTION START_EFF_TIME END_EFF_TIME]<cr>
"AGD" "11.529" "42.824" "450.0" "Arta Grotte, Djbouti" "1985,68,00:00:00.0000"
"1990,343,00:00:00.0000"<cr>
"AGD" "11.514" "42.821" "450.0" "Arta Grotte, Djbouti" "1990,347,00:00:00.0000"
"2500,365,23:59:59.9999"<cr>
"BNG" "4.435" "18.547" "378.0" "Bangui, Republique Centrafricaine" "1987,345,00:00:00.0000"
"2500,365,23:59:59.9999"<cr>
"CAY" "4.948" "-52.317" "25.0" "Cayenne, French Guyana" "1985,203,00:00:00.0000" "1991,272,00:00:00.0000"<cr>
<cr>

It is important to note that locations and channels are provided in the same line of output. Location identifiers are very closely tied in uniqueness to channel names, so it makes sense to include both on the same output line. It should be noted that a user wishing to see channel information needs to fill both the location identifier and channel field in the query, as shown in the example below. Also note the use of two channel strings contained in double-quotes in the query.

.INV GEOSCOPE G * * "MH? LH?"<cr>
[AVAILABLE NETWORKS]<cr>
[NET_CODE NETWORK_NAME OPERATORS COMMENTS]<cr>
"G" "GEOSCOPE" "IPGP" ""<cr>
<cr>
[AVAILABLE STATIONS]<cr>
[STATION LATITUDE LONGITUDE ELEVATION DESCRIPTION START_EFF_TIME END_EFF_TIME]<cr>
"AGD" "11.529" "42.824" "450.0" "Arta Grotte, Djbouti" "1985,068,00:00:00.0000" "1990,343,00:00:00.0000"<cr>
<cr>
[AVAILABLE CHANNELS]<cr>
[LOCATION CHANNEL LATITUDE LONGITUDE ELEVATION DEPTH AZIMUTH DIP SAMPLE_RATE CHANNEL_TYPE INSTRUMENT_TYPE START_EFF_TIME END_EFF_TIME]<cr>
" " "MHE" "11.529" "42.824" "450.0" "0" "90" "0" "5" "CG" "Streckeisen STS-1" "1985,068,00:00:00.0000" "1990,343,00:00:00.0000"<cr>
" " "MHN" "11.529" "42.824" "450.0" "0" "0" "0" "5" "CG" "Streckeisen STS-1" "1985,068,00:00:00.0000" "1990,343,00:00:00.0000"<cr>
" " "MHZ" "11.529" "42.824" "450.0" "0" "0" "-90" "5" "CG" "Streckeisen STS-1" "1985,068,00:00:00.0000" "1990,343,00:00:00.0000"<cr>
<cr>
[AVAILABLE STATIONS]<cr>
[STATION LATITUDE LONGITUDE ELEVATION DESCRIPTION START_EFF_TIME END_EFF_TIME]<cr>
"BNG" "4.435" "18.547" "378.0" "Bangui, Republique Centrafricaine" "1987,345,00:00:00.0000" "2500,365,23:59:59.9999"<cr>
<cr>
[AVAILABLE CHANNELS]<cr>
[LOCATION CHANNEL LATITUDE LONGITUDE ELEVATION DEPTH AZIMUTH DIP SAMPLE_RATE CHANNEL_TYPE INSTRUMENT_TYPE START_EFF_TIME END_EFF_TIME]<cr>
" " "LHE" "4.435" "18.547" "378.0" "0" "90" "0" "1" "CG" "Streckeisen STS-1" "1987,345,00:00:00.0000" "2500,365,23:59:59.9999"<cr>
" " "LHN" "4.435" "18.547" "378.0" "0" "0" "0" "1" "CG" "Streckeisen STS-1" "1987,345,00:00:00.0000" "2500,365,23:59:59.9999"<cr>
" " "LHZ" "4.435" "18.547" "378.0" "0" "0" "-90" "1" "CG" "Streckeisen STS-1" "1987,345,00:00:00.0000" "2500,365,23:59:59.9999"<cr>
<cr>

The list of available waveform data will indicate the start and end times of the available data, the number of samples, and the number of bytes. By entering a start and end time, you not only get waveform information, but only the channels and stations that have effective times within the time window will be displayed.

.INV IRIS_DMC CD WMQ * BHZ "1990 01 16 00 00 00" "1990 11 01 00 00 00"<cr>
...(network, station, and channel information)...

[AVAILABLE WAVEFORM DATA]<cr>
[START_TIME END_TIME NUMBER_SAMPLES NUMBER_BYTES]<cr>
"1990,135,16:34:51.2900" "1990,135,16:39:48.8900" "5952" "12288"<cr>
"1990,222,21:19:35.8700" "1990,222,21:24:33.4700" "5952" "12288"<cr>
"1990,255,15:35:23.0700" "1990,255,15:40:20.6700" "5952" "12288"<cr>
<cr>

The time strings in the above examples are in standard format of year, julian day, and time down to the ten-thousandth of a second. Precision at least down to the second is recommended. The format can be described in C-code syntax:

"%04d,%03d,%02d:%02d:%07.4f",(int)year,(int)jday,(int)hour,(int)min,(float)sec

Inventory data will typically be emailed back to the user. In the case of merging inventory data from different sites, the data will be concatenated with an identification header at the head of each data center's output. An identification header is always included with an inventory shipment and looks like this example:

***Inventory Shipment***
		   From: GEOFON
	 For request ID: GEOFON:Feb_12,01:27:30:1874
Originally Requested by: Joe_Seismologist (jseis@quake.institute.edu)
		     of: The Quake Institute
	  Request Label: netdc_data_gather_1

If an inventory shipment is too large to be mailed to the user (this limit is set by the data center), it is instead diverted to FTP transfer. The user is notified of the shipment through email, but the data is made available through FTP.


NetDC manual [ back ] [ forward ]

introduction •• overall concept •• request format •• request reception and delegation
datagrams •• local request processing •• inventory requests •• response requests
waveform requests •• product shipment •• installation and setup •• writing interface code
troubleshooting •• future implementations •• conclusion •• appendix A - summary of NetDC datagrams

About IRIS | Members | Programs | USArray | Seismic Monitor | Earthquakes | SeismoArchives
Mailing Lists | Stations | Data | Software | Publications | News | Contact | Site Map | Search

Incorporated Research Institutions for Seismology
1200 New York Ave NW • Suite 800 • Washington DC 20005
Phone: 202.682.2220 | Fax: 202.682.2444

Data Management Center
1408 NE 45th St. Suite 201
Seattle, WA 98105
Phone: 206.547.0393 | Fax: 206.547.1093
PASSCAL Instrument Center
100 East Road • Tech Industrial Park
New Mexico Tech • Socorro, NM 87801
Phone: 505.835.5070 | Fax: 505.835.5079

Send comments to the