Error downloading CyAN data through R httr::GET

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
meg_amanatides
Posts: 4
Joined: Tue Apr 25, 2023 6:32 pm America/New_York
Answers: 0

Error downloading CyAN data through R httr::GET

by meg_amanatides » Tue Apr 25, 2023 6:57 pm America/New_York

I am attempting to download CyAN data through R, following guidance posted here: https://wiki.earthdata.nasa.gov/display/EL/How+to+access+data+with+R.

The URL for the file I'm requesting is https://oceandata.sci.gsfc.nasa.gov/ob/getfile/L2022001.L3m_DAY_CYAN_CI_cyano_CYAN_CONUS_300m_1_1.tif. In R, I can run the following code with no error in R itself. However, the file it downloads is not the expected GeoTIFF, but instead a HTML that reads: ".:. ERROR .:. Ocean Biology Distributed Active Archive Center (OB.DAAC)
We are sorry, but an error has occurred. Please use the back button to return to the previous page".

R code (with "APPKEY" inserted instead of my actual application key):

set_config(config(followlocation=1,netrc=1,netrc_file=netrc_path,cookie=cookie_path,cookiefile=cookie_path,cookiejar=cookie_path))
httr::GET(url = 'https://oceandata.sci.gsfc.nasa.gov/ob/getfile/L2022001.L3m_DAY_CYAN_CI_cyano_CYAN_CONUS_300m_1_1.tif?appkey=[APPKEY]',
write_disk("C:/Users/Megan.Coffer/Downloads/test.tif", overwrite = TRUE))

Any guidance on what might be causing this error? I saw one other forum post with the same error, but the fix was a different URL which I don't know how to generate for this specific data.

Filters:

OB General Science - guoqingw
Subject Matter Expert
Subject Matter Expert
Posts: 79
Joined: Fri Jun 03, 2022 10:54 am America/New_York
Answers: 0
Location: NASA GSFC
Been thanked: 1 time
Contact:

Re: Error downloading CyAN data through R httr::GET

by OB General Science - guoqingw » Wed May 03, 2023 2:05 pm America/New_York

Hello,

We recently fixed a data access issue. Please try again and let us know if the problem persists.

meg_amanatides
Posts: 4
Joined: Tue Apr 25, 2023 6:32 pm America/New_York
Answers: 0

Re: Error downloading CyAN data through R httr::GET

by meg_amanatides » Wed May 03, 2023 4:32 pm America/New_York

Thanks so much! Yes, it's working for me now.

Post Reply