This Docker is used to retrieve:
- "paz": Poles and zeros file(s)
- "sac": Dataless file(s)
- "resp": Response file(s)
- "dless": Dataless file(s)
- "miniseed": MiniSeed file(s)
- "stationxml": StationXML file(s)
- "dataselect_list": A list of dataselect URL used to download MiniSeed
sending a request to each "station" FDSNS-WS to find available stations.
First, clone the git repositry:
$ git clone https://github.com/INGV/fdsnws-fetcher.git
$ cd fdsnws-fetcher
To obtain fdsnws-fetcher docker image, you have two options:
Get the last built image from DockerHub repository:
$ docker pull ingv/fdsnws-fetcher:latest
$ docker build --tag ingv/fdsnws-fetcher .
in case of errors, try:
$ docker build --no-cache --pull --tag ingv/fdsnws-fetcher .
Running the command below to see the help:
$ docker run -it --user $(id -u):$(id -g) --rm -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT ingv/fdsnws-fetcher -h
This docker search the given STATIONXML_PARAMETERS on StationXML and convert it to RESP or DATALESS files or DATASELECT_LIST list.
Print software version number:
$ docker run -it --rm ingv/fdsnws-fetcher -v
Usage:
$ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT ingv/fdsnws-fetcher -u <stationxml params>
Values for option -t: resp, paz, dless, stationxml, dataselect_list, miniseed, sac
Examples:
1) $ docker run -it --rm ingv/fdsnws-fetcher -v
2) $ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT ingv/fdsnws-fetcher -u "network=IV&station=ACER&starttime=2017-11-02T00:00:00&endtime=2017-11-02T01:00:00" -t "dataselect_list"
3) $ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT ingv/fdsnws-fetcher -u "network=IV&latitude=42&longitude=12&maxradius=1" -t "dataselect_list"
4) $ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT ingv/fdsnws-fetcher -u "network=IV&latitude=47.12&longitude=11.38&maxradius=0.5&channel=HH?,EH?,HN?" -t "dataselect_list"
5) $ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT ingv/fdsnws-fetcher -u "network=IV,MN&station=BLY&starttime=2017-11-02T00:00:00&endtime=2017-11-02T01:00:00" -t "dless"
6) $ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT ingv/fdsnws-fetcher -u "lat=45.75&lon=11.1&maxradius=1&starttime=2017-11-02T00:00:00&endtime=2017-11-02T01:00:00" -t "resp,dless"
7) $ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT ingv/fdsnws-fetcher -u "lat=45.75&lon=11.1&maxradius=1&starttime=2017-11-02T00:00:00&endtime=2017-11-02T01:00:00" -t "miniseed,resp"
8) $ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT ingv/fdsnws-fetcher -u "lat=45.75&lon=11.1&maxradius=1&starttime=2017-11-02T00:00:00&endtime=2017-11-02T01:00:00" -t "sac,dataselect_list"
Example with auth token for restricted stations:
1) $ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT -v $(pwd)/my_token:/opt/token ingv/fdsnws-fetcher -u "network=IV&station=ACER&starttime=2017-11-02T00:00:00&endtime=2017-11-02T01:00:00" -t "dataselect_list"
2) $ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT -v $(pwd)/my_token:/opt/token ingv/fdsnws-fetcher -u "lat=45.75&lon=11.1&maxradius=1&starttime=2017-11-02T00:00:00&endtime=2017-11-02T01:00:00" -t "miniseed,resp"
3) $ docker run -it --rm --user $(id -u):$(id -g) -v $(pwd)/stationxml.conf:/opt/stationxml.conf -v $(pwd)/OUTPUT:/opt/OUTPUT -v $(pwd)/my_token:/opt/token ingv/fdsnws-fetcher -u "lat=45.75&lon=11.1&maxradius=1&starttime=2017-11-02T00:00:00&endtime=2017-11-02T01:00:00" -t "sac"
$
The output data is into the ./OUTPUT
local directory.
To override the ENTRYPOINT
directive and enter into the Docker images, run:
$ docker run -it --user $(id -u):$(id -g) --rm -v $(pwd)/OUTPUT:/opt/OUTPUT -v $(pwd)/stationxml.conf:/opt/stationxml.conf --entrypoint=bash ingv/fdsnws-fetcher
or with root
:
$ docker run -it --rm -v $(pwd)/OUTPUT:/opt/OUTPUT -v $(pwd)/stationxml.conf:/opt/stationxml.conf --entrypoint=bash ingv/fdsnws-fetcher
Get last Docker image from DockerHub repository:
$ docker pull ingv/fdsnws-fetcher
Update your stationxml.conf
adding more StationXML entry point.
From version v2.30.0
, the file stationxml.conf
was update to support three columns:
- fdsn station node. mandatory
- additional
GET
paramas for station node - different dataselect node to submit waveforms request. Default is equal to station node
the syntax is:
<stationxml_node>|<additional_GET_params>|<dataselect_node>
for example:
http://webservices.ingv.it|authoritative=any|http://eidaws-internal.int.ingv.it:8080
http://service.iris.edu
http://rtserve.beg.utexas.edu
http://seisrequest.iag.usp.br
the line http://webservices.ingv.it|authoritative=any|http://eidaws-internal.int.ingv.it:8080
will be used to:
- request stations info from
http://webservices.ingv.it
addingauthoritative=any
to the request (http://webservices.ingv.it/fdsnws/station/1/query?authoritative=any&<other_params>
- request the waveforms to the dataselect node:
http://eidaws-internal.int.ingv.it/fdsnws/dataselect/1/query?<params>
Create multi-arch builder and use it:
docker buildx create \
--name container-builder \
--driver docker-container \
--use
list builders:
docker buildx ls
build multi-arch image with container-builder
builder:
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ingv/fdsnws-fetcher:latest .
return to default
builder:
docker buildx use default
NOTE:
- the
build
command, build the images but do not export it on your local registry; to do that, use--load
option BUT it works only with oneplatform
. i.e:docker buildx build --platform linux/amd64 --load -t ingv/fdsnws-fetcher:latest
- to push the image with both architectures, use
--push
option: i.e.: ``docker buildx build --platform linux/amd64,linux/arm64 --push -t ingv/fdsnws-fetcher:latest .`
Thanks to your contributions!
Here is a list of users who already contributed to this repository:
(c) 2024 Valentino Lauciani valentino.lauciani[at]ingv.it
Istituto Nazionale di Geofisica e Vulcanologia, Italia