Example of how to download a file from NASA LAADS DAAC using python
Table of contents
Create an account and get a token
Create an account and go to App key (see image below):

Then create a key name:

and copy your key number

Download a file using python
Example of python script tp download the file 'CLDPROP_L2_VIIRS_SNPP.A2015189.0024.011.2019244120347.nc'. Replace ***** by your token key number
from datetime import dateimport urllib.requestimport urllib.request, jsonimport pprintyear = 2015month = 7day = 8d0 = date(year, 1, 1)d1 = date(year, month, day)delta = d1 - d0cod = delta.days + 1opener = urllib.request.build_opener()opener.addheaders = [('Authorization', 'Bearer *********')]urllib.request.install_opener(opener)file_name = 'CLDPROP_L2_VIIRS_SNPP.A2015189.0024.011.2019244120347.nc'ladsweb_url = 'https://ladsweb.modaps.eosdis.nasa.gov/archive/allData/5111/CLDPROP_L2_VIIRS_SNPP/{:04d}/{:03d}/{}'.format(year,cod,file_name)target_dir = file_nameurllib.request.urlretrieve(ladsweb_url,target_dir)
