MERRA2 OpenDAP Bug (python)

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
bcook
Posts: 1
Joined: Fri Sep 12, 2025 12:26 pm America/New_York
Answers: 0

MERRA2 OpenDAP Bug (python)

by bcook » Fri Sep 12, 2025 12:29 pm America/New_York

Hi,

I am following the online instructions to create a python notebook that will allow me to use OpenDap to download MERRA2 data. However, at the end of the retrieval I get an error message that “RuntimeError: Failed to decode variable 'time': NetCDF: Access failure”. Here are the steps I’ve been doing. Please let me know if you would like me to share the python notebook.

(1) I first use Option 3 on this site:

https://disc.gsfc.nasa.gov/information/howto?title=How%20to%20Generate%20Earthdata%20Prerequisite%20Files

to generate and store an Earthdata login token. This works fine using my credentials, and I get confirmation that the token was retrieved and stored in my home directly as an .edl_token.

(2) I then tried running the code example verbatim provided from here (specifically the code in cell 2 beginning with “%%time”):

https://disc.gsfc.nasa.gov/information/howto?keywords=merra-2%20python&title=How%20to%20Access%20MERRA-2%20Data%20using%20OPeNDAP%20with%20Python3%20and%20Calculate%20Daily/Weekly/Monthly%20Statistics%20from%20Hourly%20Data

The code initially runs, but while it is running, I get the following:

syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR
context: HTTP^ Basic: Access denied.
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR
context: HTTP^ Basic: Access denied.
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR
context: HTTP^ Basic: Access denied.
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR
context: HTTP^ Basic: Access denied.
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR
context: HTTP^ Basic: Access denied.
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR
context: HTTP^ Basic: Access denied.
syntax error, unexpected WORD_WORD, expecting SCAN_ATTR or SCAN_DATASET or SCAN_ERROR
context: HTTP^ Basic: Access denied

It runs for a bit longer, and then crashes with the decode time error I mention above.

Thanks for your help.

Filters:

GES DISC - jimacker
User Services
User Services
Posts: 23
Joined: Wed Dec 04, 2024 4:05 pm America/New_York
Answers: 0
Has endorsed: 1 time
Endorsed: 1 time

Re: MERRA2 OpenDAP Bug (python)

by GES DISC - jimacker » Fri Sep 12, 2025 4:46 pm America/New_York

Thank you for your message. Our staff will examine the content of your message and respond as soon as possible.

Post Reply