Quantcast
Channel: Earthdata Forum
Viewing all articles
Browse latest Browse all 1307

Questions/Comments • Re: Trouble accessing files via S3

$
0
0
There is a Python library that tries to simplify how we access data from NASA called earthaccess https://github.com/nsidc/earthaccess, it may help your use case, this would be the code you need:

Code:

import earthaccessearthaccess.login()max_granules = 30# C2271754179-LPCLOUD is the identifier for this MODIS dataset, we could also use the DOI if there is one.granules = earthaccess.search_data(    concept_id="C2271754179-LPCLOUD",    temporal=("2023-01","2023-12"),    bounding_box=(-107.40,1.23,-73.30,27.52),    cloud_cover=(0,20), # up to 20% of cloud coverage    count=max_granules)files = earthaccess.download(granules[0:max_granules], "mod14/")
It simplifies how we authenticate with the added value that this code should run even out of region (us-west-2). Hope this helps.

Statistics: Posted by betolink — Mon Jan 22, 2024 10:07 pm America/New_York



Viewing all articles
Browse latest Browse all 1307

Trending Articles