Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in downloading DEM #98

Open
mhotalebi opened this issue Jul 25, 2024 · 7 comments
Open

Error in downloading DEM #98

mhotalebi opened this issue Jul 25, 2024 · 7 comments

Comments

@mhotalebi
Copy link

I am experiencing a RuntimeError when trying to download and recognize DEM and mask files using ARIAtools. Despite configuring the necessary settings and files, I encounter an error indicating that the DEM file is not recognized as a supported file format.

Configuration Steps:
Created a .netrc file with my Earthdata credentials and use !chmod 600 $HOME/.netrc
Created a .topoapi file as per the ARIAtools documentation and use !chmod 600 $HOME/.topoapi
Changed settings on the ASF site to allow DEM downloads.
Execution Steps:
Run the ARIAtools script to download the mask and DEM file.
Actual Results
The following error is thrown:
RuntimeError: `./DEM/SRTM_3arcsec_uncropped.tif' not recognized as a supported file format.

@EJFielding
Copy link
Collaborator

The ARIA-tools package requires you to get an API key from the OpenTopography site (https://opentopography.org/) and put that key into the $HOME/.topoapi file. The error you are getting is usually caused by the lack of the OpenTopography API key.

@mhotalebi
Copy link
Author

Thanks for your response!

Just to clarify, I did follow the ARIAtools documentation and created the .topoapi file as mentioned. I also set the permissions using !chmod 600 $HOME/.topoapi. Additionally, I have carefully followed all the procedures outlined in the Data_Access_Accounts.ipynb Jupyter notebook.

Please let me know if there's anything else I might have missed or if you need more details about my setup.

Best regards,

@EJFielding
Copy link
Collaborator

EJFielding commented Jul 26, 2024

@mhotalebi Did you go to the OpenTopography site, register for an account and generate an OpenTopography API key, and then copy that API key into your $HOME/.topoapi file? The API key should look something like this: 7698c9963edee3a1dc1c8912daxxxxx (I changed the last hex characters to x).

@mhotalebi
Copy link
Author

Thanks for following up!

Yes, I did register for an account on the OpenTopography site, generated an OpenTopography API key, and copied it into my $HOME/.topoapi file. The API key looks similar to the format you mentioned.

Despite following these steps, I’m still encountering issues. Any further guidance or troubleshooting steps would be greatly appreciated.

@EJFielding
Copy link
Collaborator

The next troubleshooting step is to look at the file ./DEM/SRTM_3arcsec_uncropped.tif. It is likely a text file that contains the error message that ARIA-tools got when it tried to do the download. The error you saw reported is that the file is not a valid GeoTIFF, so it is likely a text file.

@mhotalebi
Copy link
Author

Thank you for your suggestion. I checked the ./DEM/SRTM_3arcsec_uncropped.tif file, and it indeed contains the following error message:

Error: API Key required for access. Please register for an API key at www.opentopography.org

I have already registered for an API key and added it to the .topoapi file with the following commands in terminal:
echo "80902dfc83e331…" > $HOME/.topoapi
chmod 600 $HOME/.topoapi
I removed last part of API Key and use … at the end of it.
I verified that the API key is correctly stored by running cat $HOME/.topoapi, and it shows the API key as expected.
Additionally, I tried with another registration but it didn’t work either. I also use environment your team provide.
Despite these efforts, the error persists.
Untitled
Capture

@sssangha
Copy link
Contributor

@mhotalebi , thanks for bringing this to our attention. I think this particular error may be associated with data migration involving source geoid URLs (see this discussion).

I've just pushed some changes to the ARIA-tools dev branch to capture the necessary updates to successfully access DEMS. Please let me know if this resolves this issue on your end.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants