download with wget serie of files

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
sudre
Posts: 3
Joined: Tue Feb 06, 2018 9:41 am America/New_York

download with wget serie of files

by sudre » Thu Jan 27, 2022 3:42 am America/New_York

Dear Help Desk,
After several years of not having any data on your site. I need to retrieve the data from MODIS-Aqua L3m_DAY_CHL_chlor_a_4km.nc. For that, I used the wget command:
wget --post-data="sensor=modisa&sdate=2019-01-01&edate=2022-01-01&dtype=L3m&addurl=1&results_as_file=1&search=A*L3m_DAY_CHL_chlor_a_4km.nc" -O - [link= oceandata.sci.gsfc.nasa.gov/api/file_search.cgi] | wget --user=XXX --password=YYY -i - (where xxx and yyy are login and password)
I tried yesterday to run this command again but the files I get are empty. here are the responses to the command:
--2022-01-27 09:21:44-- [link= oceandata.sci.gsfc.nasa.gov/api/file_search.cgi]
Resolving proxy.legos.obs-mip.fr (proxy.legos.obs-mip.fr)... 10.10.0.1
Connecting to proxy.legos.obs-mip.fr (proxy.legos.obs-mip.fr)|10.10.0.1|:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: 92147 (90K) [text/plain]
Saving to: ‘STDOUT’

- 100%[==========================================================================================>] 89.99K 341KB/s in 0.3s

2022-01-27 09:21:46 (341 KB/s) - written to stdout [92147/92147]

--2022-01-27 09:21:46-- https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2019001.L3m_DAY_CHL_chlor_a_4km.nc
Resolving proxy.legos.obs-mip.fr (proxy.legos.obs-mip.fr)... 10.10.0.1
Connecting to proxy.legos.obs-mip.fr (proxy.legos.obs-mip.fr)|10.10.0.1|:3128... connected.
Proxy request sent, awaiting response... 302 Found
Location: /ob/getfile/A2019001.L3m_DAY_CHL_chlor_a_4km.nc [following]
--2022-01-27 09:21:46-- https://oceandata.sci.gsfc.nasa.gov/ob/getfile/A2019001.L3m_DAY_CHL_chlor_a_4km.nc
Reusing existing connection to oceandata.sci.gsfc.nasa.gov:443.
Proxy request sent, awaiting response... 302 Found
Location: https://urs.earthdata.nasa.gov/oauth/authorize?client_id=Z0u-MdLNypXBjiDREZ3roA&redirect_uri=https%3A%2F%2Foceandata.sci.gsfc.nasa.gov%2Fob%2Fgetfile%2Frestrict&response_type=code [following]
--2022-01-27 09:21:46-- https://urs.earthdata.nasa.gov/oauth/authorize?client_id=Z0u-MdLNypXBjiDREZ3roA&redirect_uri=https%3A%2F%2Foceandata.sci.gsfc.nasa.gov%2Fob%2Fgetfile%2Frestrict&response_type=code
Connecting to proxy.legos.obs-mip.fr (proxy.legos.obs-mip.fr)|10.10.0.1|:3128... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘A2019001.L3m_DAY_CHL_chlor_a_4km.nc’

A2019001.L3m_DAY_CHL_chlor_a_4km.nc [ <=> ] 11.99K --.-KB/s in 0s

2022-01-27 09:21:47 (61.0 MB/s) - ‘A2019001.L3m_DAY_CHL_chlor_a_4km.nc’ saved [12275]

--2022-01-27 09:21:47-- https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2019002.L3m_DAY_CHL_chlor_a_4km.nc
...
could you please tell me what changes to make to my command to get the 3 years of data back.

Thank you

Joel

Tags:

OB.DAAC - amscott
User Services
User Services
Posts: 218
Joined: Mon Jun 22, 2020 5:24 pm America/New_York
Answers: 1
Has thanked: 2 times

Re: download with wget serie of files

by OB.DAAC - amscott » Fri Feb 18, 2022 9:46 am America/New_York

Joel,

We have had continuous production and availability of data over the years. Your command just has some issues. Try this:

Code: Select all

wget -q --post-data="sensor=modisa&sdate=2019-01-01&edate=2022-01-01&dtype=L3m&addurl=1&results_as_file=1&search=*DAY_CHL*4km.nc" -O - https://oceandata.sci.gsfc.nasa.gov/api/file_search
You can find help with formulating commands to search for and download data on the OceanColor Web. From the navigation bar, go to DATA > Search and Download.

Post Reply