Page 1 of 1

Pulling CMC SST Data Using Python

Posted: Fri May 19, 2023 2:08 pm America/New_York
by joseph.hellmers
Hello,

I'm trying to download some data from PO.DAAC using a token that I generated in the user interface by adding an Authorization header to the request, but it is giving me an 401 authorization error.

Does anybody know of a good example of how to do this? I see some examples in a tutorial about authorizing using a Cookie store and the user name and password, but I'm wondering if there is a better way.

Thanks,
Joe Hellmers

Re: Pulling CMC SST Data Using Python

Posted: Mon May 22, 2023 7:22 pm America/New_York
by PODAAC - wenhaoli
Dear Joe,

Thank you for your inquiry.

There is a good example of obtaining the Earthdata authentication, e. g. podaac-data-subscriber. You could find the script resource from https://github.com/podaac/data-subscriber. Actually, We strongly recommend the users to use this script to download/subscriber the datasets from Earthdata cloud. The https://podaac-test.jpl.nasa.gov/dataset/CMC0.2deg-CMC-L4-GLOB-v2.0 data landing page provides the download exapmle under Data Access page. Please let us know if you have more questions.

Best Regards,

Wenhao Li

Re: Pulling CMC SST Data Using Python

Posted: Wed May 24, 2023 1:17 pm America/New_York
by joseph.hellmers
Thanks Wenhao!

That example uses urllib. I'm wondering if there is an example using urllib3.

Joe Hellmers

Re: Pulling CMC SST Data Using Python

Posted: Thu May 25, 2023 4:08 pm America/New_York
by PODAAC - wenhaoli
Dear Joe,

Sorry, I have checked with our team and confirmed that there is no examples using the urllib3.

Wenhao Li

Re: Pulling CMC SST Data Using Python

Posted: Fri May 26, 2023 8:39 am America/New_York
by joseph.hellmers
Thanks Wenhao.