Re: [python-users] Python @ Unidata: September

  • To: "ashwinD12 ." <winash12@xxxxxxxxx>
  • Subject: Re: [python-users] Python @ Unidata: September
  • From: Ryan May <rmay@xxxxxxxx>
  • Date: Mon, 10 Oct 2016 15:18:39 -0600
On Fri, Oct 7, 2016 at 10:29 PM, ashwinD12 . <winash12@xxxxxxxxx> wrote:

> Ryan,
>            These Python cookbooks are great. I learned a lot from them and
> incorporating them in my applications. Few question for you
> 1) How do you go about handling polling with OPeNDAP and Python ?
> 2) What I usually do is open a urllib2 connection and sleep on a thread
> till a GFS GRIB file is available and then grab it when it does become
> available
> 3) I presume one can do a metadata OPeNDAP call and obtain the last value
> of the "time" variable and wait till it is lesser than the current time ?


Thanks for the kind words. The way I'd approach this problem currently is
to do is similar to what you suggest and look at the last/first value of
time; however, I'd cache the last value I used and see when it changes from
that value. This handles more properly the case when the data are out of
date. Please when you do this ensure, though, that you use a sensible
polling interval--don't poll every minute for GFS runs that come in only
every 6 hours!


Ryan May, Ph.D.
Software Engineer
Boulder, CO
  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the python-users archives: