tab-based inventory modifier


Sometimes small tweaks need to be made to inventory. The tabinvmodifier program reads a rules file (a network tab file without any station lines) and applies network and station attributes to existing inventory. This method can be used to modify attributes in inventory that originate from dataless SEED or other sources. It can change inventory at the network, station, location, and channel level; it can also change sensor and datalogger attributes (Ia lines). Currently (2016) changes to station groups (virtual networks) aren’t supported.

For details of what can go in a tab file, see NETTAB File Format Description.

tabinvmodifier can either write directly to the inventory in an SC3 database, or dump its output as an XML file. If output is as an XML file, typically this would then be moved to ~/seiscomp/etc/inventory, and then loaded into the database with seiscomp update-config.


  1. Set network-level attributes. Suppose the file ge.rules contains

    Nw: GE 1993/001
    Na: Description="GEOFON Program, GFZ Potsdam, Germany"
    Na: Remark="Access to Libyan stations and Spanish HH streams limited"
    Na: Type=VBB

    The first line (Nw:) specifies the network, including its start date, that these rules apply to. The following lines starting with Na: provide values for the description, remark, and type attributes to be written into the new inventory. Note the capital letter on the attributes Description, Remark, Type, etc.

    We can use this rules file to change attributes of the GE network:

    # Apply changes to database directly
    $ tabinvmodifier -r ge.rules
    # Apply changes to XML file
    $ tabinvmodifier -r ge.rules --inventory-db ge.xml -o ge-mod.xml

    The resulting inventory now contains:

    <network publicID="Network#20130513163612.389203.2" code="GE">
      <description>GEOFON Program, GFZ Potsdam, Germany</description>
      <region>euromed global</region>
      <remark>access to Libyan stations and Spanish HH streams limited</remark>
      <station publicID="Station#20130620185450.488952.190" code="MSBI" archiveNetworkCode="GE">

    Other attributes present in inventory are left unchanged.

  2. Changing location codes. (Thanks to Andres H. for this example.) To replace an empty location code for station “KP.UPNV” with location code “00”, together with its description and place. The rules file is:

    Nw: KP 1980/001
    Sa: Description="GLISN Station Upernavik, Greenland" UPNV
    Sa: Place="Upernavik, Greenland" UPNV
    Sa: Code="00" UPNV,

    The resulting inventory now contains:

    <network publicID="Network#20140603153203.17936.2" code="KP">
      <station publicID="Station#20140603153203.179738.3" code="UPNV">
        <description>GLISN Station Upernavik, Greenland</description>
        <place>Upernavik, Greenland</place>
        <sensorLocation publicID="SensorLocation#20140603153203.181119.4" code="00">


tabinvmodifier { -r | --rules } {rules file} [options]


-r, --rules

Input filename of the rules file. A rules file is mandatory.

-e, --relaxed

Relax rules for matching NSLC items

-o, --output

Output XML filename. Without an output file, tabinvmodifier will attempt to write to the local SeisComp3 database.


Input file containing inventory. If this option is given, an output file must be provided with --output.