MERRA2 OpenDAP Download Failing

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
mlammers08atmos
Posts: 2
Joined: Tue Mar 21, 2023 3:52 pm America/New_York
Answers: 0

MERRA2 OpenDAP Download Failing

by mlammers08atmos » Tue Mar 21, 2023 3:58 pm America/New_York

Hello!

I have been seeing recurring failures in an automated process trying to download MERRA2 data using pydap. It is failing on the pydap.cas.urs.setup_session step with hardcoded username/password:

session = setup_session(USERNAME, PASSWORD, check_url = "https://goldsmr4.gesdisc.eosdis.nasa.gov:443/opendap/MERRA2/M2T1NXSLV.5.12.4/2018/01/MERRA2_400.tavg1_2d_slv_Nx.20180109.nc4")

That throws this error:
"requests.exceptions.ConnectionError: HTTPSConnectionPool(host='urs.earthdata.nasa.gov', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f99efe9efa0>: Failed to establish a new connection: [Errno 101] Network is unreachable'))"

Please let me know what I need to update to get this process working again. It had been running without issue for multiple years and started failing a couple weeks ago. Thanks!

Tags:

cbattisto
Posts: 10
Joined: Wed Feb 16, 2022 4:38 pm America/New_York
Answers: 0

Re: MERRA2 OpenDAP Download Failing

by cbattisto » Mon Mar 27, 2023 11:26 am America/New_York

Hello!

Can you please first verify that your Pydap version is >=3.2.1, and then run the following code?

from pydap.client import open_url
from pydap.cas.urs import setup_session

username = 'your_earthdata_username'
password = 'your_earthdata_password'

dataset_url = 'https://goldsmr4.gesdisc.eosdis.nasa.gov:443/opendap/MERRA2/M2T1NXSLV.5.12.4/2018/01/MERRA2_400.tavg1_2d_slv_Nx.20180109.nc4'
session = setup_session(username, password, check_url=dataset_url)
dataset = open_url(dataset_url, session=session)

-Chris Battisto

mlammers08atmos
Posts: 2
Joined: Tue Mar 21, 2023 3:52 pm America/New_York
Answers: 0

Re: MERRA2 OpenDAP Download Failing

by mlammers08atmos » Wed Mar 29, 2023 4:27 pm America/New_York

Looks like the pydap version was outdated - thank you for posting the clarifying sample code.

cbattisto
Posts: 10
Joined: Wed Feb 16, 2022 4:38 pm America/New_York
Answers: 0

Re: MERRA2 OpenDAP Download Failing

by cbattisto » Thu Mar 30, 2023 11:49 am America/New_York

You're welcome! For your reference, that example was pulled from this how-to at GES DISC: https://disc.gsfc.nasa.gov/information/howto?keywords=python&title=How%20to%20Access%20GES%20DISC%20Data%20Using%20Python

Post Reply