Thread: Florida TA stations

Started: 2018-08-02 01:58:11
Last activity: 2018-08-02 16:36:28
Woo,Han Byul
2018-08-02 01:58:11
Dear IRIS data requesting support representative,

I am a student at University of Florida, and I have an inquiry about requesting data. I have tried using the BREQ_FAST request form to download the Florida TA stations data. However, each files are too large for me to read with python, and using BREQ_FAST to request short period data for each stations will take me to do over 120 requests. Is there a way I can send a request with a single text file including all the stations with certain time period information, so I can download them in separate files? Thank you for your help in advance.

Sincerely,
Han Byul

  • Nick Falco
    2018-08-02 16:36:28
    Hi Han Byul,

    One way to do this would be write a script that calls FetchData https://seiscode.iris.washington.edu/projects/ws-fetch-scripts/wiki in a loop (download FetchData here https://seiscode.iris.washington.edu/projects/ws-fetch-scripts/files). Each iteration of the loop would call FetchData to make a data select web service http://service.iris.edu/fdsnws/dataselect/1/ call based on query arguments read from a text file (for example), and write any returned data to a separate file.

    Alternatively, if you are using the ObsPy https://github.com/obspy/obspy Python package then you can read large amounts of data in chunks. For example:

    import obspy
    import io

    reclen = 512
    chunksize = 100000 * reclen # Around 50 MB

    with io.open("./TMDB.TM.mseed", "rb") as fh:
    while True:
    with io.BytesIO() as buf:
    c = fh.read(chunksize)
    if not c:
    break
    buf.write(c)
    buf.seek(0, 0)
    st = obspy.read(buf)
    # Do something useful!
    print(st)

    This approach could eliminate the need to break up your request all together. ObsPy also has clients https://docs.obspy.org/packages/obspy.clients.fdsn.html for making web service requests that could be used as a Python alternative to calling FetchData.

    Thanks,

    Nick
    --
    Nick Falco
    Web & Apps Developer
    IRIS Data Management Center
    nick<at>iris.washington.edu

    On Aug 1, 2018, at 12:43 PM, Woo,Han Byul <hbwoo<at>ufl.edu> wrote:

    Dear IRIS data requesting support representative,

    I am a student at University of Florida, and I have an inquiry about requesting data. I have tried using the BREQ_FAST request form to download the Florida TA stations data. However, each files are too large for me to read with python, and using BREQ_FAST to request short period data for each stations will take me to do over 120 requests. Is there a way I can send a request with a single text file including all the stations with certain time period information, so I can download them in separate files? Thank you for your help in advance.

    Sincerely,
    Han Byul

    ----------------------
    Data Request Help
    Topic home: http://ds.iris.edu/message-center/topic/data-request-help/ | Unsubscribe: data-request-help-unsubscribe<at>lists.ds.iris.edu

    Sent from the IRIS Message Center (http://ds.iris.edu/message-center/)
    Update subscription preferences at http://ds.iris.edu/account/profile/


10:53:51 v.01697673