aux_getFDSNdata {eseis}R Documentation

Download seismic data from FDSN data base

Description

The function accesses the specified FDSN internet data base(s) and downloads seismic data based on the network and station IDs and time constraints.

Usage

aux_getFDSNdata(
  start,
  duration,
  channel = "BHZ",
  network,
  station,
  url,
  link_only = FALSE,
  eseis = TRUE
)

Arguments

start

POSIXct value, start time of the data to query.

duration

Numeric value, length of the data to query, in seconds.

channel

Character value, seismic channel to get. Default is "BHZ".

network

Character vector, two-character FDSN network ID.

station

Character vector, FDSN station ID.

url

Character vector, FDSN URL.

link_only

Logical vector, return only FDSN link instead of downloading and importing the data.

eseis

Logical scalar, option to read data to an eseis object (recommended, see documentation of aux_initiateeseis), default is TRUE

Details

A convenient way to get all the required input data is using the function aux_getFDSNstation before. It will return all the information in a structured way.

It is possible to use the function to process more than one data set. In this case, the arguments network, station and url must match pairwise. The arguments start, duration and channel will be treated as constants if not also provided as vectors.

Value

List object with imported seismic data for each provided set of input arguments.

Author(s)

Michael Dietze

See Also

aux_get_FDSNstation, read_mseed

Examples


## Not run: 

## get stations < 0.6 degrees away from Piz Chengalo collapse
x <- aux_getFDSNstation(centre = c(46.3, 9.6),
                        radius = 0.6,
                        access = TRUE)

## sort statiions by distance
x <- x[order(x$distance),]

## download available data
d <- aux_getFDSNdata(start = as.POSIXct(x = "2017-08-23 07:30:00", 
                                        tz = "UTC"),
                     duration = 180, 
                     network = x$network_ID, 
                     station = x$station_code, 
                     url = x$network_url)

## remove stations without available data
x <- x[!unlist(lapply(d, is.null)),]
d <- d[!unlist(lapply(d, is.null))]

## generate plots of the three nearest stations
par(mfcol = c(3, 1))

for(i in 1:3) {

  plot_signal(data = d[[i]],
              main = paste(x$ID[i], 
                           " | ",
                           round(x$distance[i], 2),
                           "distance (DD)"))
} 

## End(Not run)
                     

[Package eseis version 0.7.3 Index]