Learn R Programming

eseis (version 0.8.1)

aux_getxml: Download and/or read station XML file

Description

This function either downloads an online station XML file and (optionally) saves it and/or reads an already existing local station XML file.

Usage

aux_getxml(
  xml,
  start,
  duration,
  network,
  station,
  component,
  url,
  level = "response"
)

Value

Obspy object with station meta info inventory.

Arguments

xml

Character value, local XML file to import. If omitted, the function expects information for the other arguments listed below to download (into a temporary directory) and read the station XML file. In case both, the below information and a XML path is provided, the downloaded data will be saved under the provided XML file name.

start

POSIXct value, start time for which the XML information shall be collected. If omitted, XML information for all available time spans will be downloaded.

duration

Numeric value, duration until when the XML information shall be collected. If omitted, XML information for all available time spans will be downloaded.

network

Character value, seismic network to which the station belongs, for which the XML data will be downloaded.

station

Character value, seismic station ID for which the XML data will be downloaded. If omitted, XML information for all stations of the network will be collected.

component

Character value, component for which the XML data will be downloaded. If omitted, XML data will be collected for all components available for the specified stations.

url

Chracter vector, URL of the FDSN data provider. Should be of the form "http://service.iris.edu", i.e., without further URL parts. URLs can be submitted as a vector.

level

Character value, level of station XML information depth. Default is "response".

Author

Michael Dietze

Details

Currently, the function uses Obspy python code. Hence, both python and the package 'obspy' need to be installed in order to use the function.

Examples

Run this code

if (FALSE) {

x <- aux_getxml(start = "2010-10-10", 
                duration = 60,
                network = "GE",
                station = "BRNL",
                component = "BHZ",
                url = "http://service.iris.edu")

}

Run the code above in your browser using DataLab