Downloads#
Every source downloads through seagrid.download, so they all behave
the same way:
A file is written to
<name>.partialand renamed when complete, so an interrupted download never looks like a cached file.Transient server errors (HTTP 429/5xx, dropped connections) are retried with exponential backoff.
A failure raises
DownloadError, and refused or missing credentials raiseAuthenticationError. The original exception is attached as__cause__.
Module |
Service |
Main functions |
|---|---|---|
any HTTP(S) server |
|
|
NASA Earthdata / CMR |
|
|
Copernicus Marine |
|
|
THREDDS / Hyrax OPeNDAP |
|
|
OB.DAAC naming rules |
|
from seagrid.download import http, obpg, earthdata
name = obpg.filename("2023-06-01", "chlor_a", "daily")
earthdata.fetch(obpg.url(name), "~/data/modis/")
Which dates are downloaded#
seagrid.inventory keeps a small SQLite record of downloaded files and
prints a collapsed summary:
GLORYS12V1, 2006-01-01 to 2008-12-31: 457 of 1096 days downloaded
2006 downloaded
2007 partial (92 of 365 days)
Jan-May missing
Jun-Aug downloaded
Sep partial (5 of 30 days)
downloaded 1-5
missing 6-30
Oct-Dec missing
2008 missing