Page 1 of 1

New to EarthData, HTTP Error 401: Unauthorized

Posted: Mon Jun 24, 2024 2:56 pm America/New_York
by siddhant.pton
Hello all!

I am new to NASA Earth Data and was following the following documentation for accessing data via Python.

https://urs.earthdata.nasa.gov/documentation/for_users/data_access/python - this has the bare bones script for accessing data.

However, I have been getting an HTTPError: HTTP Error 401: Unauthorized. I am not sure if I have to further configure my NASA Earth Data account or request access to the data I want. I just created my account recently.

I am hoping to access MERRA2 wind speed data. Thanks!

----------------------

The specific URL for the page or data set you were attempting to access
https://goldsmr4.gesdisc.eosdis.nasa.gov/opendap/MERRA2/M2I1NXASM.5.12.4/2024/06/MERRA2_400.inst1_2d_asm_Nx.20240601.nc4

The date and time you accessed our site
June 24, 2024

The general type of research you are conducting
Looking at wind speeds for researching wildfires.

The name of the data product, data set, or data variable you were searching for
MERRA-2

Your access method (browser, wget, curl, please include version numbers)
Python Script in Jupyter Notebook

Operating system, name and version number
MacOS Sonoma

The application you were using
OPeNDAP data access

Any significant error message
HTTP Error 401: Unauthorized

Re: New to EarthData, HTTP Error 401: Unauthorized

Posted: Fri Jul 26, 2024 4:20 pm America/New_York
by GES DISC - xpan2
Dear user,

We are glad to assist you in accessing and applying the MERRA-2 data. I understand you failed to pass the authentication required to access NASA data. Please follow the steps below:

1) Users must register with an Earthdata Login and be authorized to access data at GES DISC by following the steps at data-access (https://disc.gsfc.nasa.gov/information/documents?title=Data%20Access).
2) Generate a .netrc file following this how-to: https://disc.gsfc.nasa.gov/information/howto?keywords=prerequisite&title=How%20to%20Generate%20Earthdata%20Prerequisite%20Files
3) Test if you can access successfully data with this Python tutorial with OPeNDAP, "How to Access MERRA-2 Data using OPeNDAP with Python3 and Calculate Daily/Weekly/Monthly Statistics from Hourly Data" (https://disc.gsfc.nasa.gov/information/howto?keywords=weekly&title=How%20to%20Access%20MERRA-2%20Data%20using%20OPeNDAP%20with%20Python3%20and%20Calculate%20Daily%2FWeekly%2FMonthly%20Statistics%20from%20Hourly%20Data%20)

In addition, please let me know the information below before I make any future proper recommendations.
1. Your interested time range
2. Your interested spatial range
3. Your interested temporal resolution

You may find this FAQ helpful in finding the proper collection for the wind speed: "I am interested in using MERRA-2 for wind analysis." (https://disc.gsfc.nasa.gov/information/faqs?keywords=wind%20speed&title=I%20am%20interested%20in%20using%20MERRA-2%20for%20wind%20analysis ). For example, this collection, https://disc.gsfc.nasa.gov/datasets/M2T1NXFLX_5.12.4/summary, contains the variable "wind speed" ready for you (no need to calculate it from U and V).

Please let us know if you have further questions on MERRA-2.

Regards,
NASA GES DISC MERRA-2 support team

Re: New to EarthData, HTTP Error 401: Unauthorized

Posted: Fri Jul 26, 2024 4:43 pm America/New_York
by mbosilov
Just in case it matters, this request for data was sent only a day after the internal QC checks were passed. It does take a little time to ship and process the data to the GES DISC. Given the short period in time, could this error just be the lag in getting data approved for release? In that case, a user should resubmit the request at a later time.

For transparency, the internal QC for June 2024 was passed at 1150PM July 22, 2024. This is roughly a week or so later than our typical release times, so later than usual. The transfer would not even begin until folks got that approval the following morning.

While we realize that there are a number of users who have very imperative time constraints, since MERRA-2 is a climate record, we adhere to some quality checks before releasing the data. Releasing data that later needs to be revised likely causes even more problems.

We greatly appreciate your use of MERRA-2 and appreciate any and all feedback on the data!

Re: New to EarthData, HTTP Error 401: Unauthorized

Posted: Tue Aug 20, 2024 11:11 am America/New_York
by GES DISC - xpan2
@sidd@siddhant.pton I just am following up to see if you can access the desired data.

Re: New to EarthData, HTTP Error 401: Unauthorized

Posted: Tue Aug 20, 2024 1:45 pm America/New_York
by siddhant.pton
Hi! I was able to use other data sources in the meantime. I will explore the solution you have provided me, thanks.

Re: New to EarthData, HTTP Error 401: Unauthorized

Posted: Tue Aug 20, 2024 1:57 pm America/New_York
by GES DISC - xpan2
It is good to know that you found an alternative solution. If you use the MERRA-2 in the future, feel free to contact us.