Skip to content

Commit 4a3f1ed

Browse files
committed
Fix PACE AOP download path by supporting explicit provider routing
1 parent bb3b54d commit 4a3f1ed

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

hypercoast/common.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ def search_pace(
267267
temporal: Optional[str] = None,
268268
count: int = -1,
269269
short_name: Optional[str] = "PACE_OCI_L2_AOP_NRT",
270+
provider: Optional[str] = None,
270271
output: Optional[str] = None,
271272
crs: str = "EPSG:4326",
272273
return_gdf: bool = False,
@@ -279,6 +280,7 @@ def search_pace(
279280
temporal (str, optional): The temporal extent of the data.
280281
count (int, optional): The number of granules to retrieve. Defaults to -1 (retrieve all).
281282
short_name (str, optional): The short name of the dataset. Defaults to "PACE_OCI_L2_AOP_NRT".
283+
provider (str, optional): The provider for the granules returned by Earthaccess.
282284
output (str, optional): The output file path to save the GeoDataFrame as a file.
283285
crs (str, optional): The coordinate reference system (CRS) of the GeoDataFrame. Defaults to "EPSG:4326".
284286
return_gdf (bool, optional): Whether to return the GeoDataFrame in addition to the granules. Defaults to False.
@@ -293,6 +295,7 @@ def search_pace(
293295
short_name=short_name,
294296
bbox=bbox,
295297
temporal=temporal,
298+
provider=provider,
296299
output=output,
297300
crs=crs,
298301
return_gdf=return_gdf,
@@ -419,6 +422,7 @@ def search_ecostress(
419422
def download_pace(
420423
granules: List[dict],
421424
out_dir: Optional[str] = None,
425+
provider: Optional[str] = None,
422426
threads: int = 8,
423427
) -> None:
424428
"""Downloads NASA PACE granules.
@@ -427,11 +431,14 @@ def download_pace(
427431
granules (List[dict]): The granules to download.
428432
out_dir (str, optional): The output directory where the granules will be
429433
downloaded. Defaults to None (current directory).
434+
provider (str, optional): The provider used for downloading the granules.
430435
threads (int, optional): The number of threads to use for downloading.
431436
Defaults to 8.
432437
"""
433438

434-
download_nasa_data(granules=granules, out_dir=out_dir, threads=threads)
439+
download_nasa_data(
440+
granules=granules, out_dir=out_dir, provider=provider, threads=threads
441+
)
435442

436443

437444
def download_emit(

0 commit comments

Comments
 (0)