On Fri, Oct 7, 2016 at 10:29 PM, ashwinD12 . <winash12@xxxxxxxxx> wrote:
> 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
> 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.