So this *should* be as easy as:
from siphon.catalog import TDSCatalog
cat = TDSCatalog('
However, because I was foolish, if you try to do this with a big file (i.e.
more than your memory), you will run out of memory because it tries to
download all the bytes first and then writes them to the file. As a
workaround, you can use this function (from here:
local_filename = url.split('/')[-1]
with requests.get(url, stream=True) as r:
with open(local_filename, 'wb') as f:
This should be fixed in the upcoming Siphon 0.9 release.
Hope this helps,
On Wed, Oct 9, 2019 at 3:02 PM Bryan Guarente <guarente@xxxxxxxx> wrote:
> I am looking for a way to grab all of today's model data as grb files. We
> had talked about grabbing the "latest" catalog and checking it every time a
> new model updates to download more data. I thought siphon or even trying
> python-awips would work to get some of this done. Pointing to an EDEX
> server seemed smart to me, but I am sure you have different ideas.
> Bryan Guarente
> Meteorologist/Instructional Designer
> The COMET Program
> Boulder, CO
> NOTE: All exchanges posted to Unidata maintained email lists are
> recorded in the Unidata inquiry tracking system and made publicly
> available through the web. Users who post to any of the lists we
> maintain are reminded to remove any personal information that they
> do not want to be made public.
> python-users mailing list
> For list information, to unsubscribe, or change your membership options,
> visit: https://www.unidata.ucar.edu/mailing_lists/
Ryan May, Ph.D.