Can't download GPM IMERG files in Windows 11 using wget
Re: Can't download GPM IMERG files in Windows 11 using wget
Same issue here but with widows 8
I can also download the link proposed, but same error regarding the GPM download. However, a few months ago I could do it, and now with exactly the same command but a new .txt of links, I cannot.
Any solution yet?
Thanks
I can also download the link proposed, but same error regarding the GPM download. However, a few months ago I could do it, and now with exactly the same command but a new .txt of links, I cannot.
Any solution yet?
Thanks
Filters:
-
- Posts: 2
- Joined: Sun Sep 10, 2023 8:43 am America/New_York
Re: Can't download GPM IMERG files in Windows 11 using wget
This is what worked for me:
1. Install GnuWin32.Make
Open a command prompt or terminal and run the following command:
winget install -e --id GnuWin32.Make
2. Click on the following link to download wget:
https://eternallybored.org/misc/wget/1.21.4/64/wget.exe
3. Move the wget Executable
Once downloaded, move the wget.exe file to the following directory:
C:\Program Files (x86)\GnuWin32\bin
4. Update System PATH
Ensure that the directory C:\Program Files (x86)\GnuWin32\bin is added to your system's PATH variable. If it's not, add it manually.
5. Install Git and Git Bash; allows you to use common bash and Linux commands on windows
Download and install Git. https://git-scm.com/downloads
During the installation process, select the option to add Git Bash to the Windows terminal.
6. Restart Your PC
To ensure all changes take effect, restart your computer.
7. Launch Git Bash
After restarting, open the Windows terminal. From the dropdown menu, select bash.
8. Download data
In the Git Bash terminal, run the following command, replacing <username> with your actual username and <url.txt> with your desired URL:
wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --keep-session-cookies --user=<username> --ask-password --content-disposition -i <url.txt>
Note: The command will prompt you to enter your password due to the --ask-password flag.
1. Install GnuWin32.Make
Open a command prompt or terminal and run the following command:
winget install -e --id GnuWin32.Make
2. Click on the following link to download wget:
https://eternallybored.org/misc/wget/1.21.4/64/wget.exe
3. Move the wget Executable
Once downloaded, move the wget.exe file to the following directory:
C:\Program Files (x86)\GnuWin32\bin
4. Update System PATH
Ensure that the directory C:\Program Files (x86)\GnuWin32\bin is added to your system's PATH variable. If it's not, add it manually.
5. Install Git and Git Bash; allows you to use common bash and Linux commands on windows
Download and install Git. https://git-scm.com/downloads
During the installation process, select the option to add Git Bash to the Windows terminal.
6. Restart Your PC
To ensure all changes take effect, restart your computer.
7. Launch Git Bash
After restarting, open the Windows terminal. From the dropdown menu, select bash.
8. Download data
In the Git Bash terminal, run the following command, replacing <username> with your actual username and <url.txt> with your desired URL:
wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --keep-session-cookies --user=<username> --ask-password --content-disposition -i <url.txt>
Note: The command will prompt you to enter your password due to the --ask-password flag.
Last edited by jared_kodero on Sun Sep 10, 2023 9:42 am America/New_York, edited 1 time in total.
-
- Posts: 354
- Joined: Mon Sep 30, 2019 1:57 pm America/New_York
- Has thanked: 2 times
- Been thanked: 9 times
Re: Can't download GPM IMERG files in Windows 11 using wget
Thank you for providing this detailed description.
Re: Can't download GPM IMERG files in Windows 11 using wget
Hello,
Have u solved your question? maybe I can help.I'm a commidity analyst with a few coding skills, and I figured this wget thing out after many tries,if u are actually willing to use wget to download data on opendap,please follow me:
1.Have an Earthdata account with username and password.
2.check your python scripts working dir, you can activate your python environment and run jupyter notebook to check your working dir, for myself is C:\Users\erc\myscripts\
3.download wget.exe, then put exe into your python scripts working dir.
4.Prerequisite file,the most perplexing one.The most simple solution is 'Create prerequisite files using Python', made by earthdata official,you can find the code in https://disc.gsfc.nasa.gov/information/howto?title=How%20to%20Generate%20Earthdata%20Prerequisite%20Files, just simply copy it to your jupyter notebook(guess you already have ) in your python environment and run without any modification, it will prompt you to input username and password,just input and enter, your prerequisite files will be accurately set.
5.now open cmd and run wget code,
wget --load-cookies C:\Users\erc\mycripts\.urs_cookies --save-cookies C:\Users\erc\mycripts\.urs_cookies --keep-session-cookies --user=() --password=() -r -c -nH -nd -np -A nc4 --content-disposition -P E:\fds "https://gpm1.gesdisc.eosdis.nasa.gov/opendap/GPM_L3/GPM_3IMERGDF.07/2014/"
Attention : this code above is my version,user and password should be filled and don't keep (),and '.urs_cookies' path should be replaced to your own,'nc4' should be your wanted format, 'E:\fds' is the filepath you wanna place downloaded files into .
That's all.
Have u solved your question? maybe I can help.I'm a commidity analyst with a few coding skills, and I figured this wget thing out after many tries,if u are actually willing to use wget to download data on opendap,please follow me:
1.Have an Earthdata account with username and password.
2.check your python scripts working dir, you can activate your python environment and run jupyter notebook to check your working dir, for myself is C:\Users\erc\myscripts\
3.download wget.exe, then put exe into your python scripts working dir.
4.Prerequisite file,the most perplexing one.The most simple solution is 'Create prerequisite files using Python', made by earthdata official,you can find the code in https://disc.gsfc.nasa.gov/information/howto?title=How%20to%20Generate%20Earthdata%20Prerequisite%20Files, just simply copy it to your jupyter notebook(guess you already have ) in your python environment and run without any modification, it will prompt you to input username and password,just input and enter, your prerequisite files will be accurately set.
5.now open cmd and run wget code,
wget --load-cookies C:\Users\erc\mycripts\.urs_cookies --save-cookies C:\Users\erc\mycripts\.urs_cookies --keep-session-cookies --user=() --password=() -r -c -nH -nd -np -A nc4 --content-disposition -P E:\fds "https://gpm1.gesdisc.eosdis.nasa.gov/opendap/GPM_L3/GPM_3IMERGDF.07/2014/"
Attention : this code above is my version,user and password should be filled and don't keep (),and '.urs_cookies' path should be replaced to your own,'nc4' should be your wanted format, 'E:\fds' is the filepath you wanna place downloaded files into .
That's all.