Windows系統中下載Earthdata數據 2


從NASA數據中心下載CH2O數據時,步驟:

1.注冊!

創建帳戶

鏈接GES DISC到賬戶(應該處於登錄狀態下)

通過下載此示例數據文件URL進行驗證

2.下載鏈接列表

3.按照wget的說明操作(這里為windows系統的下載)

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

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.

https://zhuanlan.zhihu.com/p/40307530?utm_source=qq

注:在命令行里輸入NUL > .urs_cookies 可能會出現如下,拒絕訪問,

 

 但別擔心看下URS_Cookoies(至於這個是啥,你們可以自己百度,內容太多,哈哈)在你的主目錄下沒?打開你的用戶地址看下,

 此外,可設置以管理員身份運行,但還是會出現 【拒絕訪問】:

1、打開cmd所在目錄C:\Windows\System32(操作系統分為32位和64位,視個人情況選擇),找到cmd.exe,右擊打開屬性; 

2、點擊右下角的“高級”;

3、勾選“用管理員身份運行”,並點擊確定;

4、再打開cmd,重新輸入命令並執行即可。

    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=<your username> --ask-password --content-disposition <url>

    • --auth-no-challenge may not be needed depending on your version of wget
    • <your username> is the username belonging to your Earthdata account
    • <url> 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 <url>

To download multiple data files at once, create a plain-text <url.txt> 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=<your username> --ask-password --content-disposition -i <url.txt>

 

######################################################請注意如下##########################################################

先將目錄轉到wget和 txt目錄下   例如 cd C:\Users

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

 ########################################################################################################################

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM