podaacpy drive API

class drive.Drive(file, username, password, webdav_url='https://podaac-tools.jpl.nasa.gov/drive/files')
download_granules(granule_collection=None, path='')

Granule download service downloads a granule collection from PO.DAAC Drive to the users’ local machine at the given path. Note, as of https://github.com/nasa/podaacpy/issues/131 we now maintain the PO.DAAC Drive directory structure. This is to say, if the Drive URL was https://podaac-tools.jpl.nasa.gov/drive/files/allData/ghrsst/data/GDS2/L2P/AVHRR19_L/NAVO/v1/2019/088/20190329001403-NAVO-L2P_GHRSST-SST1m-AVHRR19_L-v02.0-fv01.0.nc then a directory structure would be created as follows allData/ghrsst/data/GDS2/L2P/AVHRR19_L/NAVO/v1/2019/088/20190329001403-NAVO-L2P_GHRSST-SST1m-AVHRR19_L-v02.0-fv01.0.nc

Parameters:
  • granule_collection (string) – a populated collection of PO.DAAC Drive Granule URLs. These can be obtained by using the drive.mine_drive_urls_from_granule_search() function which itself merely wraps a podaac.granule_search() request.
  • path (string) – path to a directory where you want the data to be stored.
Returns:

a zip file downloaded and extracted in the destination directory path provided.

Convenience function which extracts the PO.DAAC Drive URLs from a given granule search obtained using podaac.granule_search(). The response of this function is an array of strings denoting the PO.DAAC Drive URLs to the granules.

Parameters:granule_search_response

the output response of a podaac.granule_search() :type path: string

returns:prints an array of PO.DAAC Drive URLs.