fdsn mass_downloader

Dear all,

I tried to download both HH* and HN* data from an fdsn service using the fdsn mass_downloader.

I set to restrictions (channel=HH*) so it downloaded only HH* data.
Then, I set (channel=HN*) but it couldn't download them. I tried by setting channel_priorities=("HN[ZNE]", "HN[ZNE]") and at this way, it downloaded them.

1) Is there any issue with "channel" and "channel_priorities"?
2) Since I run these commands individually, is there a way to merge both channels to the stations' xml?
3) Is there a way to download both HH* and HN* at once?

Thank you in advance,
Nikos

Hi Nikos,

1) Is there any issue with "channel" and "channel_priorities"?

It works as intended. The network/station/location/channel codes are
used for the initial availability query. The
channel_priority/location_priority are later on used to filter the
availability to restrict it to the subset of things one wants.

I agree it might be a bit confusing - if you have any ideas on how to
improve the documentation, please open an issue on github.

2) Since I run these commands individually, is there a way to merge both
channels to the stations' xml?
3) Is there a way to download both HH* and HN* at once?

Yes to both, this simple examples script does it. Essentially it uses a
wildcard for the location priority list and unix pattern matching for
the channel priorities. Thus it will now just find a lot more channels
for the first priority item it and it will download all of them
including the necessary station information in a single file per station.

import obspy
from obspy.clients.fdsn.mass_downloader import GlobalDomain, \
    Restrictions, MassDownloader

origin_time = obspy.UTCDateTime(2011, 3, 11, 5, 47, 32)
domain = GlobalDomain()

restrictions = Restrictions(
    network="RO", station="BMR",
    starttime=origin_time - 60,
    endtime=origin_time + 60,
    channel_priorities=["H[NH][ZNE]"],
    location_priorities=["*"])

mdl = MassDownloader(providers=["GFZ"])
mdl.download(domain, restrictions, mseed_storage="waveforms",
             stationxml_storage="stations")

One thing to keep in mind: The documentation currently uses tuples for
the location and channel priority lists. Python's semantics require a
comma to actually make a tuple a tuple, thus do

channel_priorities=("H[NH][ZNE]",) instead of

channel_priorities=("H[NH][ZNE]") which the mass downloader would
interpret as

channel_priorities=("H", "[", "N", "H", "]", "[", "Z", "N", "E", "]")
which naturally results in no matches...

Or just use a list like the example in this email

Cheers!

Lion