modis_download_from_list.rst 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. modis_download_from_list.py
  2. ---------------------------
  3. **modis_download_from_list.py** downloads MODIS data from NASA servers,
  4. the names of files to download have to be contained into a text file.
  5. .. warning::
  6. Remember to register yourself at https://urs.earthdata.nasa.gov/users/new,
  7. read more at :ref:`userpw-label` session.
  8. .. note::
  9. The script is able also to read the
  10. `.netrc file <https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html>`_.
  11. You have to add something similar to this ::
  12. machine urs.earthdata.nasa.gov
  13. login YOURUSER
  14. password YOURPASSWD
  15. Usage
  16. ^^^^^
  17. .. code-block:: none
  18. modis_download_from_list.py [options] destination_folder
  19. Options
  20. ^^^^^^^
  21. .. image:: ../_static/gui/modis_download_from_list.png
  22. :scale: 50%
  23. :alt: GUI for modis_download_from_list.py
  24. :align: left
  25. :class: gui
  26. .. code-block:: none
  27. -h --help show the help message and exit
  28. -f --file Input file containing data to donwload
  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. -s --source directory on the http/ftp
  34. [default=MOLT]
  35. -p --product product name as on the http/ftp server
  36. [default=MOD11A1.006]
  37. -o --outputs the output where write the missing files in the server
  38. [default=none]. Use 'stdout' to write to STDOUT
  39. -n use netrc file to read user and password
  40. -x this is useful for debugging the download
  41. [default=False]
  42. -j download also the jpeg files [default=False]
  43. Examples
  44. ^^^^^^^^
  45. The following text should be in your *MODTiles.txt* file
  46. .. code-block:: none
  47. MOD11A1.A2012278.h19v11.005.*.hdf*
  48. MOD11A1.A2012278.h19v12.005.*.hdf*
  49. MOD11A1.A2012278.h20v11.005.*.hdf*
  50. MOD11A1.A2012278.h20v12.005.*.hdf*
  51. MOD11A1.A2012278.h21v11.005.*.hdf*
  52. Download Terra LST data from the above text file
  53. .. code-block:: none
  54. modis_download_from_list.py -U user -P passwd -f /tmp/MODTiles.txt /tmp
  55. The following text should be in your *MYDTiles.txt* file
  56. .. code-block:: none
  57. MYD11A1.A2012278.h19v11.005.*.hdf*
  58. MYD11A1.A2012278.h19v12.005.*.hdf*
  59. MYD11A1.A2012278.h20v11.005.*.hdf*
  60. MYD11A1.A2012278.h20v12.005.*.hdf*
  61. MYD11A1.A2012278.h21v11.005.*.hdf*
  62. Download Aqua LST data from the above text file
  63. .. code-block:: none
  64. modis_download_from_list.py -I -s MOLA -p MYD11A1.005 -f /tmp/MYDTiles.txt /tmp
  65. .. only:: latex
  66. .. raw:: latex
  67. \newpage % hard pagebreak at exactly this position