Page 1 of 1

failed to use wget/curl or hdf to download MCD43A3.061 MODIS data

Posted: Tue Apr 18, 2023 5:22 pm America/New_York
by canacelqr123
Hi there!

I encountered a confusing problem when downloading the MCD43A3.061 data this afternoon. When I tried to download data via list.txt using curl and wget:

curl --request POST --user USERNAME:PASSWORD --header "Content-Length: 0" "https://appeears.earthdatacloud.nasa.gov/api/login" (it returns me a TOKEN and seems that I log in to the system successfully)

After that, I input the following:

wget --header "Authorization: Bearer TOKEN" -i list.txt

The system responded that it connected but showed:

HTTP request sent, awaiting response...401 Unauthorized

I tried other ways, such as:
wget --user USERNAME --ask-password https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/MCD43A3.061/MCD43A3.A2018011.h13v02.061.2021313115305/MCD43A3.A2018011.h13v02.061.2021313115305.hdf

curl -H "Authorization: Bearer TOKEN" -O $url -o LOCATION

But all of them didn't work and returned '403 forbidden' or '401 Unauthorized'

After that, I copied the HTTP link to input in my browser, and it showed access denied.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>BX4RX1CZ0DJFBBSM</RequestId>
<HostId>+RQ8tI/nljlHaO+bqRpVvIa+fjuyg986BDgCY1Q3mJ4htZQGEpYS5KeZjaDPLulofB5Fl/BRVO4=</HostId>
</Error>

However, it works when I click the download button for each file on my web browser. But the download from the web browser always stops suddenly, and hard to find the stop point.

So, I wonder if there is a problem with the HTTP link provided in list.txt or another access problem. Because I tried to create other multiple tasks and enter HTTP links in list.txt but failed again.

Appreciate you a lot for your help!

Best regards,
Qianru

Re: failed to use wget/curl or hdf to download MCD43A3.061 MODIS data

Posted: Tue Apr 18, 2023 5:25 pm America/New_York
by LP DAAC - dgolon
Hi @canacelqr123 thank you for reporting this issue. We have had several users report this issue today. We are looking into what is causing the issue and will report back when we have additional information and when the data are available again. Thank you.

Re: failed to use wget/curl or hdf to download MCD43A3.061 MODIS data

Posted: Tue Apr 18, 2023 5:28 pm America/New_York
by LP DAAC - dgolon
Hello again, @canacelqr123 I just received word from the team that this issue is now resolved. Could you please try again and let me know if you are still having issues accessing the data? Thanks!

Re: failed to use wget/curl or hdf to download MCD43A3.061 MODIS data

Posted: Wed Apr 19, 2023 11:42 am America/New_York
by canacelqr123
Hi, @LP DAAC - dgolon ! Thanks for solving this problem! I can now download files using txt files. However, I found that the documents listed in that txt are hdf. I checked the previous txt I got last month, and they are all in tiff format. So I wonder if there is any way to get the tiff file in link.txt ?

Thank you very much!

Best regards,
Qianru

Re: failed to use wget/curl or hdf to download MCD43A3.061 MODIS data

Posted: Thu Apr 20, 2023 10:36 am America/New_York
by LP DAAC - afriesz
@canacelqr123 ,

If the URLs in your list start with https://data.lpdaac.earthdatacloud.nasa.gov/, then you are access the source data which is only available in HDF. If you are using AppEEARS, you can request data be returned in GeoTIFF/COG format. A list can be generated to those AppEEARS output and downloaded via wget and curl. Note, there is a granule list generated for each request in AppEEARS. This list contains the links to the source data (in HDF) that were used by AppEEARS to complete the request.