modis_download.rst 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. modis_download.py
  2. -----------------
  3. **modis_download.py** downloads MODIS data from NASA FTP servers.
  4. It can download large amounts of data and it can be profitably
  5. used with cron jobs to receive data with a fixed delay of time.
  6. .. warning::
  7. Remember to register yourself at https://urs.earthdata.nasa.gov/users/new,
  8. read more at :ref:`userpw-label` session.
  9. .. note::
  10. The script is able also to read the
  11. `.netrc file <https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html>`_.
  12. You have to add something similar to this ::
  13. machine urs.earthdata.nasa.gov
  14. login YOURUSER
  15. password YOURPASSWD
  16. Usage
  17. ^^^^^
  18. ::
  19. modis_download.py [options] destination_folder
  20. Options
  21. ^^^^^^^
  22. .. image:: ../_static/gui/modis_download.png
  23. :scale: 60%
  24. :alt: GUI for modis_download.py
  25. :align: left
  26. :class: gui
  27. .. code-block:: none
  28. -h --help shows the help message and exit
  29. -u --url http/ftp server url [default=https://e4ftl01.cr.usgs.gov]
  30. -I --input insert user and password from standard input
  31. -P --password password to connect
  32. -U --username username to connect
  33. -t --tiles string of tiles separated by comma
  34. [default=none] for all tiles
  35. -s --source directory on the http/ftp server
  36. [default=MOLT]
  37. -p --product product name as on the http/ftp server
  38. [default=MOD11A1.005]
  39. -D --delta delta of day starting from first day [default=10]
  40. -f --firstday the day to start download, if you want change
  41. data you have to use this format YYYY-MM-DD
  42. ([default=none] is for today)
  43. -e --endday the day to finish download, if you want change
  44. data you have to use this format YYYY-MM-DD
  45. ([default=none] use delta option)
  46. -x useful for debugging the download
  47. [default=False]
  48. -j download also the jpeg files [default=False]
  49. -O download only one day, it sets delta=1 [default=False]
  50. -A download all days, useful for initial download of a
  51. product. It overwrites the 'firstday' and 'endday'
  52. options [default=False]
  53. -r remove files with size same to zero from
  54. 'destination_folder' [default=False]
  55. Examples
  56. ^^^^^^^^
  57. Download Terra LST data for a month for two tiles from HTTP server
  58. .. code-block:: none
  59. modis_download.py -I -r -t h18v03,h18v04 -f 2008-01-01 -e 2008-01-31 lst_terra/
  60. Download the last 15 days of Aqua LST data
  61. .. code-block:: none
  62. modis_download.py -I -r -s MOLA -p MYD11A1.005 -t h18v03,h18v04 -D 15 lst_aqua/
  63. Download all tiles of NDVI for one day (you have pick the right day otherwise it does not download anything)
  64. .. code-block:: none
  65. modis_download.py -U user -P passwd -r -p MOD13Q1.005 -f 2010-12-31 -O
  66. Download Snow product from FTP server
  67. .. only:: html
  68. .. code-block:: none
  69. modis_download.py -I -u ftp://n4ftl01u.ecs.nasa.gov -p [email protected] -s SAN/MOST -p MOD10A1.005
  70. .. only:: latex
  71. .. code-block:: none
  72. modis_download.py -I -u ftp://n4ftl01u.ecs.nasa.gov -p [email protected]
  73. -s SAN/MOST -p MOD10A1.005
  74. .. raw:: latex
  75. \newpage % hard pagebreak at exactly this position