Recent MODIS SST files w/no content

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
gnwiii
Posts: 713
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 2
Has thanked: 1 time

Recent MODIS SST files w/no content

by gnwiii » Thu Jan 23, 2020 10:10 am America/New_York

The following works for me.  Note that I get the 200 OK.  

$ wget -4 --save-cookies cookies.txt --load-cookies cookies.txt --keep-session-cookies --adjust-extension  --auth-no-challenge=on https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2020019183000.L2_LAC_OC.nc
--2020-01-23 10:55:18--  https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/A2020019183000.L2_LAC_OC.nc
Resolving oceandata.sci.gsfc.nasa.gov (oceandata.sci.gsfc.nasa.gov)... xx.xxx.xx.xx
Connecting to oceandata.sci.gsfc.nasa.gov (oceandata.sci.gsfc.nasa.gov)|xx.xxx.xx.xx|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: /ob/getfile/A2020019183000.L2_LAC_OC.nc [following]
--2020-01-23 10:55:19--  https://oceandata.sci.gsfc.nasa.gov/ob/getfile/A2020019183000.L2_LAC_OC.nc
Reusing existing connection to oceandata.sci.gsfc.nasa.gov:443.
HTTP request sent, awaiting response... 302 Found
Location: https://urs.earthdata.nasa.gov/oauth/authorize?client_id=Z0u-MdLNypXBjiDREZ3roA&response_type=code&redirect_uri=https%3A%2F%2Foceandata.sci.gsfc.nasa.gov%2Fob%2Fgetfile%2Frestrict&required_scope=study_area,country [following]
--2020-01-23 10:55:19--  https://urs.earthdata.nasa.gov/oauth/authorize?client_id=Z0u-MdLNypXBjiDREZ3roA&response_type=code&redirect_uri=https%3A%2F%2Foceandata.sci.gsfc.nasa.gov%2Fob%2Fgetfile%2Frestrict&required_scope=study_area,country
Resolving urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)... xx.xxx.xx.xx
Connecting to urs.earthdata.nasa.gov (urs.earthdata.nasa.gov)|xx.xxx.xx.xx|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://oceandata.sci.gsfc.nasa.gov/ob/getfile/restrict?code=42f2c420f5441e5b4baf182cc468b632081834d32e803e60a1336e85d8e13470 [following]
--2020-01-23 10:55:19--  https://oceandata.sci.gsfc.nasa.gov/ob/getfile/restrict?code=42f2c420f5441e5b4baf182cc468b632081834d32e803e60a1336e85d8e13470
Connecting to oceandata.sci.gsfc.nasa.gov (oceandata.sci.gsfc.nasa.gov)|xx.xxx.xx.xx|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: /ob/getfile/A2020019183000.L2_LAC_OC.nc [following]
--2020-01-23 10:55:20--  https://oceandata.sci.gsfc.nasa.gov/ob/getfile/A2020019183000.L2_LAC_OC.nc
Reusing existing connection to oceandata.sci.gsfc.nasa.gov:443.
HTTP request sent, awaiting response... 200 OK
Length: 29482727 (28M) [application/octet-stream]
Saving to: ‘A2020019183000.L2_LAC_OC.nc’

A2020019183000.L2_LAC_OC.nc   100%[=================================================>]  28.12M  47.6MB/s    in 0.6s

2020-01-23 10:55:26 (47.6 MB/s) - ‘A2020019183000.L2_LAC_OC.nc’ saved [29482727/29482727]


I need the -4 so wget won't try to use IPv6. 
$ wget --version |head -4
GNU Wget 1.20.3 built on linux-gnu.

-cares +digest +gpgme +https +ipv6 +iri +large-file +metalink +nls
+ntlm +opie +psl +ssl/gnutls

Tags:

7yl4r
Posts: 27
Joined: Tue Jul 18, 2017 10:07 am America/New_York
Answers: 0

Recent MODIS SST files w/no content

by 7yl4r » Thu Jan 23, 2020 10:15 am America/New_York

Thank you! Based on that I was able to create the following updated command from the original post which works for me.
Should the documentation be updated?


tylar@tylar-Latitude-XT3:~/test$ wget --post-data="subID=1930&addurl=1&results_as_file=1" -O - https://oceandata.sci.gsfc.nasa.gov/api/file_search | wget -4 --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies  --keep-session-cookies --adjust-extension --auth-no-challenge=on -P ./ -i -

OB.DAAC - SeanBailey
User Services
User Services
Posts: 1470
Joined: Wed Sep 18, 2019 6:15 pm America/New_York
Answers: 1
Been thanked: 5 times

Recent MODIS SST files w/no content

by OB.DAAC - SeanBailey » Thu Jan 23, 2020 10:40 am America/New_York

I am glad your issue is resolved (thanks George!)
We will add a caveat to the documentation, as the -4 option is not always required.

Regards,
Sean

Post Reply