Can't connect using wget or curl to https://oceandata.sci.gsfc.nasa.gov/ob/

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
johnwoodill
Posts: 2
Joined: Tue Apr 11, 2023 6:11 pm America/New_York
Answers: 0
Been thanked: 1 time

Can't connect using wget or curl to https://oceandata.sci.gsfc.nasa.gov/ob/

by johnwoodill » Tue Apr 11, 2023 6:18 pm America/New_York

About a week ago the daily script I run to access CyAN data stopped working. After further investigation, I can't download using wget or curl. The file that is downloaded is not able to be loaded as it was before. I am able to manually download at: https://oceandata.sci.gsfc.nasa.gov/directdataaccess/Level-3%20Mapped/Merged-S3-CYAN/2023/100/

I have a ~/.netrc with login and password. I've also tried using "@appkey={APP_KEY}" but that doesn't work either. Any help would be much appreciated.

Here are the command line calls I have used to access these files:

wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --keep-session-cookies https://oceandata.sci.gsfc.nasa.gov/ob/getfile/L2023100.L3m_DAY_CYAN_CI_cyano_CYAN_CONUS_300m_7_5.tif -O data/cyan/L2023100.L3m_DAY_CYAN_CI_cyano_CYAN_CONUS_300m_7_5.tif

curl -O -b ~/.urs_cookies -c ~/.urs_cookies -L -n https://oceandata.sci.gsfc.nasa.gov/ob/getfile/L2023100.L3m_DAY_CYAN_CI_cyano_CYAN_CONUS_300m_7_5.tif -o data/cyan/L2023100.L3m_DAY_CYAN_CI_cyano_CYAN_CONUS_300m_7_5.tif
Last edited by johnwoodill on Wed Apr 12, 2023 2:46 pm America/New_York, edited 1 time in total.

Tags:

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

Re: Can't connect using wget or curl to https://oceandata.sci.gsfc.nasa.gov/ob/

by OB.DAAC - amscott » Wed Apr 12, 2023 2:13 pm America/New_York

Thanks for reporting. Taking a look..

johnwoodill
Posts: 2
Joined: Tue Apr 11, 2023 6:11 pm America/New_York
Answers: 0
Been thanked: 1 time

Re: Can't connect using wget or curl to https://oceandata.sci.gsfc.nasa.gov/ob/

by johnwoodill » Wed Apr 12, 2023 2:49 pm America/New_York

Thanks. Sorry, there was a typo above for the wget call where the output -O was not defined correctly.

It appears to be working now. The original script was using the appkey as follows:

"https://oceandata.sci.gsfc.nasa.gov/ob/getfile/L2023100.L3m_DAY_CYAN_CI_cyano_CYAN_CONUS_300m_7_3.tif?appkey={CYAN_APPKEY}"

This is what stopped working. When I add "wget --load-cookies ~/.urs_cookies --save-cookies ~/.urs_cookies --keep-session-cookies " today it appears to be working.

I'll report back if I run into additional issues. Much appreciated.

OB WebDev - masoudso
Subject Matter Expert
Subject Matter Expert
Posts: 23
Joined: Tue Dec 22, 2020 2:11 pm America/New_York
Answers: 0
Has thanked: 2 times

Re: Can't connect using wget or curl to https://oceandata.sci.gsfc.nasa.gov/ob/

by OB WebDev - masoudso » Wed Apr 12, 2023 3:44 pm America/New_York

Hello,
Please clear your browser cache and visit appkey web page to make sure that you're using the correct appkey.
Let us know if this helps.

Thank you

Post Reply