Skip to content

Commit

Permalink
removed s3credentials print
Browse files Browse the repository at this point in the history
  • Loading branch information
asteiker committed Jul 3, 2024
1 parent e7cb5bc commit a0dacd9
Showing 1 changed file with 28 additions and 53 deletions.
81 changes: 28 additions & 53 deletions docs/howto/edl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,7 @@
"execution_count": 1,
"id": "ce723d6f-8b5f-43e1-9531-19ee08a056fe",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"You're now authenticated with NASA Earthdata Login\n",
"Using token with expiration date: 09/25/2023\n",
"Using environment variables for EDL\n"
]
}
],
"outputs": [],
"source": [
"import earthaccess\n",
"\n",
Expand All @@ -40,32 +30,17 @@
"metadata": {},
"source": [
"### Data in AWS\n",
"If the data we want to access is on AWS, we can use earthaccess to generate temporary S3 credentials for any of the DAACs"
"If the data we want to access is on AWS, we can use earthaccess to generate temporary S3 credentials for any of the DAACs. "
]
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"id": "3108ff21-1ea2-449b-b2f5-b442dd3b61f5",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'accessKeyId': 'ASIA2D3OGJNTE2UAIDHR',\n",
" 'secretAccessKey': '9+6D3m76HTuNi3qvbgUMBFlJECsCgPyJ4ur2CfZL',\n",
" 'sessionToken': 'FwoGZXIvYXdzEPL//////////wEaDIVnMBd6zBaEKmG58CLpAXrPN52vpRHvs+0y960kNwGOdFHPD81WVsdeUciP/vQvsU/xX4Cg+iLH/OXDlH/PBWCmSgfk4vgXD9k6r2JRmnpkwyF4v4K4+ciIuUHNG43ZegSFtkzZoLHShLtEnNu/OIT0TlcrOLJIY+TnjEDcKkXiLSsLYB7qDKZIeg654oPCkjeXyDuoWOumJa7utBEwHmakOGdGJTthOfbfJ6RJ9sbPbmsEXg0bHF5PY9h3/Eoq0rjyRmlb1WYuopw5YK8dL5N9IwSKlKiu19Cj0nd04XVNuiB02+fLDubsnKK1b3j0jR53qAU3FxobKLHgj6YGMi0kDN7xWP6yqI7Ry69Lf5EEcDRVp4UVz6llGYoDpsKr9s3cXaBljkhEjH7N5dQ=',\n",
" 'expiration': '2023-07-28 17:43:29+00:00'}"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"s3_credentials = auth.get_s3_credentials(\"NSIDC\")\n",
"s3_credentials"
"s3_credentials = auth.get_s3_credentials(\"NSIDC\")"
]
},
{
Expand All @@ -88,7 +63,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 3,
"id": "a7bb1a93-6f85-40cd-93b4-ce821a03a8b5",
"metadata": {},
"outputs": [],
Expand All @@ -102,7 +77,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 4,
"id": "c0f4e286-8ce9-4cde-b3a2-631b361a0d51",
"metadata": {},
"outputs": [
Expand All @@ -112,7 +87,7 @@
"'�HDF\\r\\n\\x1a\\n\\x00\\x00\\x00\\x00\\x00\\x08\\x08\\x00\\x04\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00���������HUn\\x00\\x00\\x00\\x00��������\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00`\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00OHDR\\x02'"
]
},
"execution_count": 15,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -133,7 +108,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 5,
"id": "1e5f5f7a-0643-42cb-b70c-4ac982824ff9",
"metadata": {},
"outputs": [],
Expand All @@ -143,7 +118,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 6,
"id": "fbc7bc5f-b984-4324-b095-3648a437fba2",
"metadata": {},
"outputs": [
Expand All @@ -153,7 +128,7 @@
"b'\\x89HDF\\r\\n\\x1a\\n\\x00\\x00\\x00\\x00\\x00\\x08\\x08\\x00\\x04\\x00\\x10\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xd7HUn\\x00\\x00\\x00\\x00\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\xff\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00`\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00OHDR'"
]
},
"execution_count": 11,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -166,19 +141,19 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 7,
"id": "07433a9f-f276-4d2b-9ed3-f556df2884af",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "f68d214c1c4b4d0fb0b44d878a003a33",
"model_id": "ac15458d5f9e4b8aac40f2e5417b22c7",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"QUEUEING TASKS | : 0it [00:00, ?it/s]"
"QUEUEING TASKS | : 0%| | 0/1 [00:00<?, ?it/s]"
]
},
"metadata": {},
Expand All @@ -187,7 +162,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "185025ed0c284481982459d85c8dbb1f",
"model_id": "100cb212635146bab6548c8bf171d970",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -201,7 +176,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ec660bd64a284df28a03705f56eea208",
"model_id": "3754ed8d0297407cade522b651c59ead",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -216,8 +191,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 983 ms, sys: 101 ms, total: 1.08 s\n",
"Wall time: 18.3 s\n"
"CPU times: user 2.73 s, sys: 241 ms, total: 2.97 s\n",
"Wall time: 10.9 s\n"
]
},
{
Expand Down Expand Up @@ -586,25 +561,25 @@
" stroke: currentColor;\n",
" fill: currentColor;\n",
"}\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt;\n",
"</style><pre class='xr-text-repr-fallback'>&lt;xarray.Dataset&gt; Size: 3kB\n",
"Dimensions: (bands: 285)\n",
"Dimensions without coordinates: bands\n",
"Data variables:\n",
" wavelengths (bands) float32 ...\n",
" fwhm (bands) float32 ...\n",
" good_wavelengths (bands) float32 ...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-5bccc958-c146-4c96-bff3-3bb1192cabe4' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-5bccc958-c146-4c96-bff3-3bb1192cabe4' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>bands</span>: 285</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-1762f4af-4275-4de2-a60b-212974a37714' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-1762f4af-4275-4de2-a60b-212974a37714' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-a0ec6ab2-8789-423c-b8a5-68b7ad70c280' class='xr-section-summary-in' type='checkbox' checked><label for='section-a0ec6ab2-8789-423c-b8a5-68b7ad70c280' class='xr-section-summary' >Data variables: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>wavelengths</span></div><div class='xr-var-dims'>(bands)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-e0a4ffbe-5053-4b11-a89a-cac8825f524d' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-e0a4ffbe-5053-4b11-a89a-cac8825f524d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-d5354c83-0276-431a-913a-bcd675945ac4' class='xr-var-data-in' type='checkbox'><label for='data-d5354c83-0276-431a-913a-bcd675945ac4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Wavelength Centers</dd><dt><span>units :</span></dt><dd>nm</dd></dl></div><div class='xr-var-data'><pre>[285 values with dtype=float32]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>fwhm</span></div><div class='xr-var-dims'>(bands)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-3c8797e7-1c1b-4423-ae85-057084395786' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-3c8797e7-1c1b-4423-ae85-057084395786' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-a54f045f-96b6-49c5-9266-e5615af70a7f' class='xr-var-data-in' type='checkbox'><label for='data-a54f045f-96b6-49c5-9266-e5615af70a7f' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Full Width at Half Max</dd><dt><span>units :</span></dt><dd>nm</dd></dl></div><div class='xr-var-data'><pre>[285 values with dtype=float32]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>good_wavelengths</span></div><div class='xr-var-dims'>(bands)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-93a19519-a78f-4b37-9b63-fd503a602141' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-93a19519-a78f-4b37-9b63-fd503a602141' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-74aa0491-8340-4332-a2cc-d85b7aa96407' class='xr-var-data-in' type='checkbox'><label for='data-74aa0491-8340-4332-a2cc-d85b7aa96407' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Wavelengths where reflectance is useable: 1 = good data, 0 = bad data</dd><dt><span>units :</span></dt><dd>unitless</dd></dl></div><div class='xr-var-data'><pre>[285 values with dtype=float32]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-2e739f0a-61b0-4394-9f22-6e6de6d1b193' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-2e739f0a-61b0-4394-9f22-6e6de6d1b193' class='xr-section-summary' title='Expand/collapse section'>Indexes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-db876828-0745-4d96-a611-e74dbe3f8be3' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-db876828-0745-4d96-a611-e74dbe3f8be3' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
" wavelengths (bands) float32 1kB ...\n",
" fwhm (bands) float32 1kB ...\n",
" good_wavelengths (bands) float32 1kB ...</pre><div class='xr-wrap' style='display:none'><div class='xr-header'><div class='xr-obj-type'>xarray.Dataset</div></div><ul class='xr-sections'><li class='xr-section-item'><input id='section-a77454ce-32d9-4909-8c2f-c3a69f1acf05' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-a77454ce-32d9-4909-8c2f-c3a69f1acf05' class='xr-section-summary' title='Expand/collapse section'>Dimensions:</label><div class='xr-section-inline-details'><ul class='xr-dim-list'><li><span>bands</span>: 285</li></ul></div><div class='xr-section-details'></div></li><li class='xr-section-item'><input id='section-3e7c8c34-32f3-4201-a03b-bdc984c1cbc2' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-3e7c8c34-32f3-4201-a03b-bdc984c1cbc2' class='xr-section-summary' title='Expand/collapse section'>Coordinates: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-a6f008f4-112b-4032-a4f8-71aeda7d1911' class='xr-section-summary-in' type='checkbox' checked><label for='section-a6f008f4-112b-4032-a4f8-71aeda7d1911' class='xr-section-summary' >Data variables: <span>(3)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'><li class='xr-var-item'><div class='xr-var-name'><span>wavelengths</span></div><div class='xr-var-dims'>(bands)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-a1e99f53-de37-49f4-801b-28a334707122' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-a1e99f53-de37-49f4-801b-28a334707122' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-555eb7e3-7b9c-4e1a-aa4f-723a6321f4f8' class='xr-var-data-in' type='checkbox'><label for='data-555eb7e3-7b9c-4e1a-aa4f-723a6321f4f8' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Wavelength Centers</dd><dt><span>units :</span></dt><dd>nm</dd></dl></div><div class='xr-var-data'><pre>[285 values with dtype=float32]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>fwhm</span></div><div class='xr-var-dims'>(bands)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-92f72bbe-e94a-4cce-a3b1-491e689450e5' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-92f72bbe-e94a-4cce-a3b1-491e689450e5' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2fe6397f-1398-4e1f-b838-45a166683893' class='xr-var-data-in' type='checkbox'><label for='data-2fe6397f-1398-4e1f-b838-45a166683893' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Full Width at Half Max</dd><dt><span>units :</span></dt><dd>nm</dd></dl></div><div class='xr-var-data'><pre>[285 values with dtype=float32]</pre></div></li><li class='xr-var-item'><div class='xr-var-name'><span>good_wavelengths</span></div><div class='xr-var-dims'>(bands)</div><div class='xr-var-dtype'>float32</div><div class='xr-var-preview xr-preview'>...</div><input id='attrs-48051428-22ff-4a40-85e7-27ff7c18a3c7' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-48051428-22ff-4a40-85e7-27ff7c18a3c7' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-f4b76c8f-6015-4870-a7e7-e21a6b65eaa4' class='xr-var-data-in' type='checkbox'><label for='data-f4b76c8f-6015-4870-a7e7-e21a6b65eaa4' title='Show/Hide data repr'><svg class='icon xr-icon-database'><use xlink:href='#icon-database'></use></svg></label><div class='xr-var-attrs'><dl class='xr-attrs'><dt><span>long_name :</span></dt><dd>Wavelengths where reflectance is useable: 1 = good data, 0 = bad data</dd><dt><span>units :</span></dt><dd>unitless</dd></dl></div><div class='xr-var-data'><pre>[285 values with dtype=float32]</pre></div></li></ul></div></li><li class='xr-section-item'><input id='section-dc6c043e-46f6-4544-be92-b2f94b99f0fd' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-dc6c043e-46f6-4544-be92-b2f94b99f0fd' class='xr-section-summary' title='Expand/collapse section'>Indexes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><ul class='xr-var-list'></ul></div></li><li class='xr-section-item'><input id='section-5dbe57d8-f873-48bb-8e68-b27e57402e7b' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-5dbe57d8-f873-48bb-8e68-b27e57402e7b' class='xr-section-summary' title='Expand/collapse section'>Attributes: <span>(0)</span></label><div class='xr-section-inline-details'></div><div class='xr-section-details'><dl class='xr-attrs'></dl></div></li></ul></div></div>"
],
"text/plain": [
"<xarray.Dataset>\n",
"<xarray.Dataset> Size: 3kB\n",
"Dimensions: (bands: 285)\n",
"Dimensions without coordinates: bands\n",
"Data variables:\n",
" wavelengths (bands) float32 ...\n",
" fwhm (bands) float32 ...\n",
" good_wavelengths (bands) float32 ..."
" wavelengths (bands) float32 1kB ...\n",
" fwhm (bands) float32 1kB ...\n",
" good_wavelengths (bands) float32 1kB ..."
]
},
"execution_count": 13,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -638,7 +613,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.16"
"version": "3.10.14"
}
},
"nbformat": 4,
Expand Down

0 comments on commit a0dacd9

Please sign in to comment.