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

updating earthdata access notebook to force token update #122

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion book/tutorials/data_access/data_access_2_earthdata.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,25 @@
" auth = Auth().login(strategy='interactive')"
]
},
{
"cell_type": "markdown",
"id": "a210a6e6-eefb-442f-bb8d-32650f8e2910",
"metadata": {},
"source": [
"If we need to access a dataset under an access control list (ACL) is always a good idea to refresh\n",
"our access tokens with CMR."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8e0a1571-e5c2-47e5-bd35-19c40c7147d8",
"metadata": {},
"outputs": [],
"source": [
"auth.refresh_tokens()"
]
},
{
"cell_type": "markdown",
"id": "26aa3967-e4dc-4429-8929-ba04be7f6a6d",
Expand Down Expand Up @@ -471,7 +490,7 @@
"try:\n",
" files = access.get(cloud_granules[0:2], \"/tmp/demo-NSIDC_CPRD/\")\n",
"except Exception as e:\n",
" print(\"If we are here maybe we are not in us-west-2 or the collection \")"
" print(\"If we are here maybe we are not in us-west-2 or the collection is restricted\")"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion conda/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
- dask
- dask-labextension
- datashader
- earthdata
- earthdata>=0.3
- fsspec
- geemap
- gh
Expand Down