I am trying to download MODIS Data from 2000-2018, however I am encountering some difficulties.

Here is my script

         MODISoptions(localArcPath = "/Volumes/myserver/MODIS/data", 
         outDirPath = "/Volumes/myserver/MODIS/data/proc_data")
         runGdal("MOD13A2", collection = "006", # see getCollection("MOD13Q1", forceCheck = TRUE)
         tileH = 8, tileV = 7, # MODIS tile id
         begin = "2000.02.18", end = "2018.03.31", # time period
         SDSstring = "110000000000") # SDS layers to extract (here: NDVI, EVI)

I am trying to do multiple dates from H: 6-8, and V: 7-9. However, when I run it, the program downloads several tiles then encounters this error:

   "Username/Password Authentication Failed.
   Remote connection failed! Re-try: 1 Getting file from: LAADS 
   trying URL 'ftp://ladsweb.nascom.nasa.gov/allData/6/MOD13A2/2000/353/MOD13A2.A2000353.h08v07.006.2017285143550.hdf' 
   Content type 'unknown' length 7085835 bytes (6.8 MB)
   Downloaded after: 2 re-tries 
   Error in load(fls_col) : empty (zero-byte) input file"

How do I get around this?

I believe it to be a missing tile, and the code terminating instead of skipping it, and going to the next one.


LAADS FTP is deprecated and its data moved to HTTPS. Use MODIS_1.1.3 (or higher) which covers this important migration. With this package version, your code runs smoothly on my machine.


tfs = runGdal("MOD13A2", collection = "006", 
              tileH = 8, tileV = 7, 
              begin = "2000.02.18", end = "2000.03.10", 
              SDSstring = "110000000000") # extract NDVI and EVI
# $`MOD13A2.006`
# $`MOD13A2.006`$`2000-02-18`
# [1] "../MODIS_ARC/PROCES~1/MOD13A2.006_20180912132721/MOD13A2.A2000049.1_km_16_days_NDVI.tif"
# [2] "../MODIS_ARC/PROCES~1/MOD13A2.006_20180912132721/MOD13A2.A2000049.1_km_16_days_EVI.tif" 
# $`MOD13A2.006`$`2000-03-05`
# [1] "../MODIS_ARC/PROCES~1/MOD13A2.006_20180912132721/MOD13A2.A2000065.1_km_16_days_NDVI.tif"
# [2] "../MODIS_ARC/PROCES~1/MOD13A2.006_20180912132721/MOD13A2.A2000065.1_km_16_days_EVI.tif"

For further details and download alternatives (ie. get data from LP DAAC using Earthdata login credentials), please check out my answers to the following SO questions:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.