Closed betolink closed 2 years ago
Do you have ideas on how to do this? I have just this use case right now.
I think we just need to add handlers for get
and open
to check if we're dealing with a DataGranule list or simple links, but I was waiting to have the fsspec feature first. All the open and get operations should be done with fsspec and that requires a heavy refactoring of the EDL authentication. I hope to work on this next week.
There is a WIP, we can download granules by passing only a list of files to the GET method but they links have to be HTTPS. We still need to implement the logic to infer the data center and credentials to use if the links are in S3.
if we have a list that looks like this we can now use the Store
:
granules = ['https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/ASTGTM.003/ASTGTMV003_N57W103_dem.tif',
'https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/ASTGTM.003/ASTGTMV003_N59W109_dem.tif',
'https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/ASTGTM.003/ASTGTMV003_N58W104_dem.tif',
'https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/ASTGTM.003/ASTGTMV003_N55W109_dem.tif',
'https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/ASTGTM.003/ASTGTMV003_N54W103_dem.tif']
store = Store(auth)
files = store.get(granules, local_path="./data/")
right now,
get
andopen
require aDataGranule
array, if a user already has a list of files from a NASA DAAC, get and open should work the same way.