Skip to content

Commit

Permalink
move s3credential to commented code cell
Browse files Browse the repository at this point in the history
  • Loading branch information
asteiker committed Jul 3, 2024
1 parent 9c75e7d commit 5bc9fb9
Showing 1 changed file with 25 additions and 19 deletions.
44 changes: 25 additions & 19 deletions docs/howto/edl.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +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. This line is commented out for security reasons. Please copy the following line into a new code block in order to obtain your credentials. \n",
"\n",
"```\n",
"s3_credentials = auth.get_s3_credentials(\"NSIDC\")\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. This line is commented out for security reasons. "
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "f1f45172-c9c3-4f25-ad7e-acf94fba8b1d",
"metadata": {},
"outputs": [],
"source": [
"#s3_credentials = auth.get_s3_credentials(\"NSIDC\")"
]
},
{
Expand All @@ -57,7 +63,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"id": "a7bb1a93-6f85-40cd-93b4-ce821a03a8b5",
"metadata": {},
"outputs": [],
Expand All @@ -71,7 +77,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "c0f4e286-8ce9-4cde-b3a2-631b361a0d51",
"metadata": {},
"outputs": [
Expand All @@ -81,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": 3,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -102,7 +108,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"id": "1e5f5f7a-0643-42cb-b70c-4ac982824ff9",
"metadata": {},
"outputs": [],
Expand All @@ -112,7 +118,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"id": "fbc7bc5f-b984-4324-b095-3648a437fba2",
"metadata": {},
"outputs": [
Expand All @@ -122,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": 5,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -135,14 +141,14 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"id": "07433a9f-f276-4d2b-9ed3-f556df2884af",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9e8e316215154002afe0c89ccc174a04",
"model_id": "c76e3afc58a84118a04144f2f08ff6bc",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -156,7 +162,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ff1c8adf11a04dc4aa799fe45aa7460d",
"model_id": "98f4219952eb4e9bb8f60ad67f438454",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -170,7 +176,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "77eac7c793e7416bb91196733769f3fe",
"model_id": "9451a7fda27e4569968054028576999d",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -185,8 +191,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 1.37 s, sys: 207 ms, total: 1.58 s\n",
"Wall time: 11.8 s\n"
"CPU times: user 1.4 s, sys: 179 ms, total: 1.58 s\n",
"Wall time: 10.5 s\n"
]
},
{
Expand Down Expand Up @@ -561,7 +567,7 @@
"Data variables:\n",
" 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-f3191e16-f6f0-4ea6-8a65-ff2fb9b1d7a3' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-f3191e16-f6f0-4ea6-8a65-ff2fb9b1d7a3' 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-8b396b6f-7ebb-4f1b-9fa0-80ef526ccc79' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-8b396b6f-7ebb-4f1b-9fa0-80ef526ccc79' 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-b01fce12-3752-4a0f-9325-d753200229fc' class='xr-section-summary-in' type='checkbox' checked><label for='section-b01fce12-3752-4a0f-9325-d753200229fc' 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-be533a94-3dc4-4afd-bf0a-0f2bb93006bb' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-be533a94-3dc4-4afd-bf0a-0f2bb93006bb' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-2ebcd4b7-baf8-439d-9359-a721890439d8' class='xr-var-data-in' type='checkbox'><label for='data-2ebcd4b7-baf8-439d-9359-a721890439d8' 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-ae219362-43ef-4535-8ad1-8b22613f8dba' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ae219362-43ef-4535-8ad1-8b22613f8dba' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-85e821e2-e6a8-4ba8-afef-4807aebc3ff9' class='xr-var-data-in' type='checkbox'><label for='data-85e821e2-e6a8-4ba8-afef-4807aebc3ff9' 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-5d2cc45b-0bcb-490a-9a68-bee2a718111d' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-5d2cc45b-0bcb-490a-9a68-bee2a718111d' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-fb3356cc-cd92-4ef7-9f35-ad87797cf084' class='xr-var-data-in' type='checkbox'><label for='data-fb3356cc-cd92-4ef7-9f35-ad87797cf084' 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-72d5040f-ff26-4e3d-83ab-84d1f04c602c' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-72d5040f-ff26-4e3d-83ab-84d1f04c602c' 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-17e53eab-bf26-4ea5-96ad-d2a9f5490cde' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-17e53eab-bf26-4ea5-96ad-d2a9f5490cde' 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>"
" 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-b1b699f4-766b-4d09-8cbe-1d22a07ce34c' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-b1b699f4-766b-4d09-8cbe-1d22a07ce34c' 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-3e1c77f1-41a1-4173-ac5a-c42885b8aba8' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-3e1c77f1-41a1-4173-ac5a-c42885b8aba8' 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-03e1951c-1120-435b-98d3-26366989e0bf' class='xr-section-summary-in' type='checkbox' checked><label for='section-03e1951c-1120-435b-98d3-26366989e0bf' 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-08f2a7d3-bd0d-41fc-a46a-7472dfe19761' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-08f2a7d3-bd0d-41fc-a46a-7472dfe19761' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-18d24452-7612-492f-a326-47d2a56a166a' class='xr-var-data-in' type='checkbox'><label for='data-18d24452-7612-492f-a326-47d2a56a166a' 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-d1b8ab05-42d0-4abd-ad53-beb2718843de' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-d1b8ab05-42d0-4abd-ad53-beb2718843de' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-b43dba25-5b67-415e-9df1-ff527de84b8e' class='xr-var-data-in' type='checkbox'><label for='data-b43dba25-5b67-415e-9df1-ff527de84b8e' 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-ca321b4b-ff16-471a-aec6-1147cd0ee4f9' class='xr-var-attrs-in' type='checkbox' ><label for='attrs-ca321b4b-ff16-471a-aec6-1147cd0ee4f9' title='Show/Hide attributes'><svg class='icon xr-icon-file-text2'><use xlink:href='#icon-file-text2'></use></svg></label><input id='data-df0b3402-29b5-4277-a4d8-8988208f56b0' class='xr-var-data-in' type='checkbox'><label for='data-df0b3402-29b5-4277-a4d8-8988208f56b0' 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-3fba5e55-9e87-4cbb-8a80-8dd5f46c7edd' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-3fba5e55-9e87-4cbb-8a80-8dd5f46c7edd' 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-ef9fd5ca-497d-456e-afec-d21e885c1e22' class='xr-section-summary-in' type='checkbox' disabled ><label for='section-ef9fd5ca-497d-456e-afec-d21e885c1e22' 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> Size: 3kB\n",
Expand All @@ -573,7 +579,7 @@
" good_wavelengths (bands) float32 1kB ..."
]
},
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand Down

0 comments on commit 5bc9fb9

Please sign in to comment.