NASA遥感数据批量下载程序

近日需要下载NASA的多时期OMI遥感数据,手动下载实在太慢,没想到NASA提供了批量下载程序WGET

https://disc.gsfc.nasa.gov/data-access#windows_wget

下载WGET软件后,按照官网上的示例教程填写命令即可。

以windows为例,

wget for Windows

  1. Make sure you have setup your Earthdata account.
  2. Install wget if necessary. A version of wget 1.18 complied with gnuTLS 3.3.3 or OpenSSL 1.0.2 or LibreSSL 2.0.2 or later is recommended.
  3. Create a cookie file. This file will let you download GES DISC resources without having to re-login.
    1. Open a run-command window by pressing WinKey + R
    2. Next, enter "cmd" in the text field and click "OK"
    3. Navigate to the directory you wish to create the cookies file in. In this guide, we place it under the C drive, but any directory will do. You can navigate to the C drive by entering C:
    4. Finally, enter NUL > .urs_cookies.
      Note: you may need to re-create .urs_cookies in case you have already executed wget without valid authentication.
      Note: you can get 'Access denied' error. Enter 'dir' to verify that '.urs_cookies' file is listed in your directory.
  4. Download your data using wget:

    wget --load-cookies C:\.urs_cookies --save-cookies C:\.urs_cookies --auth-no-challenge=on --keep-session-cookies --user= --ask-password --content-disposition

    • --auth-no-challenge may not be needed depending on your version of wget
    •  is the username belonging to your Earthdata account
    •  is the link that points to a file you wish to download or to an OPeNDAP resource.
    • Your Earthdata password might be requested on the first download
    • If you wish to download an entire directory, such as this example URL, use the following command:

      wget --load-cookies C:\.urs_cookies --save-cookies C:\.urs_cookies --auth-no-challenge=on --keep-session-cookies -np -r --content-disposition

To download multiple data files at once, create a plain-text  file with each line containing a GES DISC data file URL. Then, enter the following command:

wget --load-cookies C:\.urs_cookies --save-cookies C:\.urs_cookies --auth-no-challenge=on --keep-session-cookies --user= --ask-password --content-disposition -i

你可能感兴趣的:(遥感)