- Home
- Documentation
- API reference
- Archive
- hyperproc.archive.cmr
hyperproc.archive.cmr¶
Source-derived reference
Generated from the current hyperproc 0.1.2 checkout.
Implementation: hyperproc/archive/cmr.py. Signatures, defaults, docstrings, and expandable source are extracted statically; the module is not imported or executed. Names beginning with _ are implementation details, not a stable public API.
Use the function signature as the authority for individual parameter defaults and return annotations. Original docstrings sometimes group parameter names or wrap return descriptions across lines; these descriptions are preserved rather than inferred or rewritten.
The CMR-backed half of :mod:hyperproc.archive, over earthaccess.
URS = 'https://urs.earthdata.nasa.gov'
module-attribute
¶
_earthaccess()
¶
Source code in hyperproc/archive/cmr.py
_bbox_of(umm: dict) -> tuple[float, float, float, float] | None
¶
The granule footprint as (west, south, east, north).
CMR states the footprint as a polygon, which is the honest shape for a rotated swath, but a box is what a listing can show and what a map needs.
Source code in hyperproc/archive/cmr.py
_browse_of(umm: dict) -> str | None
¶
A quicklook a browser can load, or None.
CMR lists the same image twice, once over https and once as an s3://
URI that nothing outside AWS can open, so only the https one is any use on
a map. Some collections list a browse that was never written - PACE's all
404 - which is a property of the archive, not something to paper over.
Source code in hyperproc/archive/cmr.py
_time_of(umm: dict) -> datetime | None
¶
Source code in hyperproc/archive/cmr.py
search(sensor: str, level: str | None = None, *, bbox=None, date=None, cloud: tuple[float, float] | None = None, version: str | None = None, count: int = 100, verbose: bool = True, **kwargs) -> Results
¶
Find granules.
| PARAMETER | DESCRIPTION |
|---|---|
sensor
|
TYPE:
|
level
|
TYPE:
|
bbox
|
DEFAULT:
|
date
|
DEFAULT:
|
cloud
|
TYPE:
|
version
|
a collection version. Left open by default on purpose: EMIT carries two live versions and pinning one hides the other.
TYPE:
|
count
|
cap on granules returned.
TYPE:
|
verbose
|
print the query and the total.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Results
|
class: |
Source code in hyperproc/archive/cmr.py
_granule(raw, sensor: str, level: str, short_name: str) -> Granule
¶
Source code in hyperproc/archive/cmr.py
download(results, out_dir: str | Path = 'data', workers: int = 8, verbose: bool = True) -> list[Path]
¶
Fetch granules into out_dir.
| PARAMETER | DESCRIPTION |
|---|---|
results
|
a :class:
|
out_dir
|
created if missing. Everything lands flat, which is what the readers expect - they find a granule's siblings by name.
TYPE:
|
workers
|
parallel connections.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
list[Path]
|
the downloaded paths. |
Needs a free Earthdata login; earthaccess reads ~/.netrc or the
EARTHDATA_USERNAME/EARTHDATA_PASSWORD variables, else asks once.