lucadelu / pyModis

python library to work with MODIS data
http://www.pymodis.org/
Other
166 stars 86 forks source link

Empty Files and No JPG Images #111

Open diksa23 opened 6 years ago

diksa23 commented 6 years ago

Hi,

I followed all the instructions on the PyModis Web Site such as accept the applications. But when I'm running the simple code below i only have empty files (listfileMOD10A1.006, modisMOD10A1.006) and no jpg images. Can you help me please ?

import wx
from pymodis import downmodis

user = 'XXXX'
password = 'XXXX'
url =  'https://n5eil01u.ecs.nsidc.org/'
destinationFolder = 'C:/Users/XXXX/XXXX'

product = 'MOD10A1.006'
path = 'MOST'
today = '2016.06.02'
enddate = '2016.06.01'
tiles = None

dm = downmodis.downModis(destinationFolder, password=password, user=user, url=url, 
           path=path, product=product, tiles=tiles, today=today, enddate=enddate, debug=True, jpg=True)
dm.connect()
dm.downloadsAllDay()

In the file modisMOD10A1.006 it's written :

2018-06-13 18:02:57,757 - DEBUG - The number of days to download is: 2 2018-06-13 18:02:57,757 - DEBUG - The url is: https://n5eil01u.ecs.nsidc.org/MOST/MOD10A1.006/2016.06.02 2018-06-13 18:02:57,761 - DEBUG - Starting new HTTPS connection (1): n5eil01u.ecs.nsidc.org 2018-06-13 18:02:58,547 - DEBUG - https://n5eil01u.ecs.nsidc.org:443 "GET /MOST/MOD10A1.006/2016.06.02 HTTP/1.1" 302 463 2018-06-13 18:02:58,555 - DEBUG - Starting new HTTPS connection (1): urs.earthdata.nasa.gov 2018-06-13 18:02:59,448 - DEBUG - https://urs.earthdata.nasa.gov:443 "GET /oauth/authorize?app_type=401&client_id=_JLuwMHxb2xX6NwYTb4dRA&response_type=code&redirect_uri=https%3A%2F%2Fn5eil01u.ecs.nsidc.org%2FOPS%2Fredirect&state=aHR0cHM6Ly9uNWVpbDAxdS5lY3MubnNpZGMub3JnL01PU1QvTU9EMTBBMS4wMDYvMjAxNi4wNi4wMg HTTP/1.1" 401 None 2018-06-13 18:02:59,456 - DEBUG - The number of file to download is: 0 2018-06-13 18:02:59,456 - DEBUG - The url is: https://n5eil01u.ecs.nsidc.org/MOST/MOD10A1.006/2016.06.01 2018-06-13 18:02:59,464 - DEBUG - Starting new HTTPS connection (1): n5eil01u.ecs.nsidc.org 2018-06-13 18:03:00,219 - DEBUG - https://n5eil01u.ecs.nsidc.org:443 "GET /MOST/MOD10A1.006/2016.06.01 HTTP/1.1" 302 463 2018-06-13 18:03:00,223 - DEBUG - Starting new HTTPS connection (1): urs.earthdata.nasa.gov 2018-06-13 18:03:00,998 - DEBUG - https://urs.earthdata.nasa.gov:443 "GET /oauth/authorize?app_type=401&client_id=_JLuwMHxb2xX6NwYTb4dRA&response_type=code&redirect_uri=https%3A%2F%2Fn5eil01u.ecs.nsidc.org%2FOPS%2Fredirect&state=aHR0cHM6Ly9uNWVpbDAxdS5lY3MubnNpZGMub3JnL01PU1QvTU9EMTBBMS4wMDYvMjAxNi4wNi4wMQ HTTP/1.1" 401 None 2018-06-13 18:03:01,006 - DEBUG - The number of file to download is: 0 2018-06-13 18:03:01,006 - DEBUG - Download terminated

jigmegrs commented 5 years ago

Hi Diksa23, Your end date is BEFORE your start date, that could be the reason you're getting the message 'The number of file to download is: 0' in your log file.

lucadelu commented 4 years ago

The date format should be YYYY-MM-DD