Hi All,
Some errors arise when I use massdownloader, which causes the data to be incomplete. Can I prevent these issues and download all the data? If not, are there any ways to print out the messages about the missing data (e.g.,. network.station.channel)? Thank you! I attached my code and errors below.
import obspy
from obspy.clients.fdsn.mass_downloader import RectangularDomain, \
Restrictions, MassDownloader
domain = RectangularDomain(minlatitude=42, maxlatitude=52,
minlongitude=-132, maxlongitude=-120)
# Define dt = 1 week = 7 days * 24 hrs * 60 mins * 60 seconds
dt = 7 * 24 * 60 * 60 + 2 * 60 * 60
# ====================Loop through each mainshock===========================
for i in data:
event_time = obspy.UTCDateTime(i[1])
restrictions = Restrictions(
starttime=event_time - dt,
endtime=event_time + dt,
# Chunk it to have one file per day.
chunklength_in_sec=86400,
# Considering the enormous amount of data associated with continuous
# requests, you might want to limit the data based on SEED identifiers.
# If the location code is specified, the location priority list is not
# used; the same is true for the channel argument and priority list.
network="NV,OO", channel="EHZ,HHZ",
# The typical use case for such a data set are noise correlations where
# gaps are dealt with at a later stage.
reject_channels_with_gaps=False,
# Same is true with the minimum length. All data might be useful.
minimum_length=0.0,
# Guard against the same station having different names.
minimum_interstation_distance_in_m=100.0)
# Restrict the number of providers if you know which serve the desired
# data. If in doubt just don't specify - then all providers will be
# queried.
mdl = MassDownloader(providers=["IRIS"])
mdl.download(domain, restrictions, mseed_storage="waveform",
stationxml_storage="station")
Most of time, it can download waveforms successfully, but sometimes, three types of errors arise which are:
obspy.clients.fdsn.mass_downloader - ERROR: Client 'IRIS' - Unknown Error (URLError): <urlopen error [Errno -3] Temporary failure in name resolution>
obspy.clients.fdsn.mass_downloader - ERROR: Client 'IRIS' - timed out
obspy.clients.fdsn.mass_downloader - ERROR: Client 'IRIS' - Unknown Error (URLError): <urlopen error [Errno -2] Name or service not known>
Thank you for your help!