-
Notifications
You must be signed in to change notification settings - Fork 8
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
Using data from NSIDC is not possible #13
Comments
Thanks for raising the issue here. One approach for now can be following the procedure of NSIDC's example notebook here: https://github.com/nsidc/NSIDC-Data-Access-Notebook/blob/master/notebooks/Customize%20and%20Access%20NSIDC%20Data.ipynb However, that does not solve the problem of the general requirement for login credentials by NSIDC. Maybe @steingod has some alternative ideas or comments? Is there a way one could get access to NSIDC data through CVL without login credentials? |
I have no immediate solution as we haven't tried to interface earthdata profiles earlier. I will check with contacts at NSIDC if there are Single Sign On solutions that could be used. |
I have no immediate solution as we haven't tried to interface earthdata profiles earlier. I will check with contacts at NSIDC if there are Single Sign On solutions that could be used as we have such an interface scheduled for deployment although primarily tested against PTEP currently. |
Julia mentioned this question and I'd be happy to help! I'm currently presenting at AGU but will look into this ASAP. |
After clicking on the data link from the CVL website, I selected [NASA Earthdata Search]. After filtering the area I needed, I could get ".nc" files. There are many files and I needed daily data only, so with help of a Chorom Extenstion tool (Simple mass downloader), I could download the massive amount of data that I wanted (around 100 GB). https://search.earthdata.nasa.gov/search Very nice Addon Thanks for the help |
Hi @ykern I dropped the ball on this one after AGU, I don't know what is the core issue with downloading data from NSIDC from your compute environment but it should be doable. There are many ways of downloading data but all of them require the users to authenticate with NASA EDL. Using a
In case you're interested, I've been working on a Python library called earthaccess to simplify programmatic access to NASA data (not just NSIDC). We can download data from any NASA DAAC using very few lines of code if we know our dataset's This would be the code to download a year of MODIS Snow Cover, import earthaccess as ea
ea.login(strategy="environment")
granules = ea.search_data(
concept_id="C1646610417-NSIDC_ECS",
temporal=("2018","2019")
)
ea.download(granules, local_path="./modis_data") NASA is rolling a new way of universally accessing data using tokens, first users need to generate a token with with EDL, the token is valid for 3 months and it can be included in HTTP requests as bearer tokens. These are read only tokens. import requests
my_token="LONG_STRING"
data = requests.get(URL, headers={"Authorization": f"Bearer: {my_token}"}) I'm not registered with PTEP but I assume you could integrate any of these 2 methods with your python environment, hopefully this is a start to solve the issue. |
Thanks very much @betolink. I think this should be a good set of approaches for @Faramarz-bagherzadeh to check out and follow up on. |
Thank you all. import earthaccess
auth = earthaccess.login(strategy="interactive")
earthaccess.login(strategy="environment")
granules = earthaccess.search_data(
concept_id="C1597320047-NSIDC_ECS",
bounding_box=(-51.06, 75.6, -35.9, 77.4),
cloud_hosted=True,
downloadable = True,
temporal=("2011-05", "2015-05"),
count=100)
#earthaccess.download(granules, local_path="./modis_data") |
Hi @Faramarz-bagherzadeh I think the difference is on the |
Hi @betolink , Thank you for the help. I see the correct filtering is with a downloadable filter. All is good now and I could get all the files that I needed with earthaccess. As the library is doing most of the work, for getting the daily files, I simply changed them to string as below. I sent a pull request as well to contribute this code to the CVL early adaptors project. Thanks, everyone for helping me. daily_granules = []
for gr in granules:
if 'daily' in str(gr):
daily_granules.append(gr) |
Thanks for all the efforts everyone. I will close the issue. Please reopen it in case a follow up is needed. |
Hello,
I am trying to get data from NSIDC. The mapped products are huge files and hard to download, process, and upload again. Is it possible to use this data in CVL directly without the need for a username and password? I need this data to proceed with the project. thanks
The text was updated successfully, but these errors were encountered: