|
21 | 21 | "source": [ |
22 | 22 | "## **1. Tutorial Introduction/Overview**\n", |
23 | 23 | "\n", |
24 | | - "We will use the `earthaccess` library to authenticate with our Earthdata Login credentials and to search for and bulk download SMAP data. For this tutorial we wil use SPL3SMP version 008 as an example, but the same method can be applied to any other SMAP data sets archived at NSIDC. \n" |
| 24 | + "We will use the `earthaccess` library to authenticate with our Earthdata Login credentials and to search for and bulk download SMAP data. For this tutorial we wil use SPL3SMP version 009 as an example, but the same method can be applied to any other SMAP data sets archived at NSIDC. \n" |
25 | 25 | ] |
26 | 26 | }, |
27 | 27 | { |
|
31 | 31 | "source": [ |
32 | 32 | "### **Credits**\n", |
33 | 33 | "\n", |
34 | | - "This tutorial is based on the notebooks originally provided to NSIDC by Adam Purdy. Jennifer Roebuck of NSIDC updated the tutorials to include the latest version of SMAP data and use `earthaccess` for authentication, seatching for and downloading the data in order to incorporate it into the NSIDC-Data-Tutorials repo. \n", |
| 34 | + "This tutorial is based on the notebooks originally provided to NSIDC by Adam Purdy. Jennifer Roebuck of NSIDC updated the tutorials to include the latest version of SMAP data and use `earthaccess` for authentication, searching for and downloading the data in order to incorporate it into the NSIDC-Data-Tutorials repo. Andy Barrett refactored the notebook to use `pathlib.Path` and updated the version of the data set used.\n", |
35 | 35 | "\n", |
36 | 36 | "For questions regarding the notebook, or to report problems, please create a new issue in the [NSIDC-Data-Tutorials repo](https://github.com/nsidc/NSIDC-Data-Tutorials/issues)." |
37 | 37 | ] |
|
85 | 85 | "metadata": {}, |
86 | 86 | "source": [ |
87 | 87 | "### **Import libraries**\n", |
88 | | - "We need just two libraries, `os` for creating the directory to store the downloaded data in and `earthaccess` to authenticate, search for and download the data. " |
| 88 | + "We two libraries, `os` for creating the directory to store the downloaded data in and `earthaccess` to authenticate, search for and download the data. " |
89 | 89 | ] |
90 | 90 | }, |
91 | 91 | { |
92 | 92 | "cell_type": "code", |
93 | | - "execution_count": 1, |
| 93 | + "execution_count": null, |
94 | 94 | "id": "059690ab-7dff-45c9-816a-6060a191f550", |
95 | 95 | "metadata": {}, |
96 | | - "outputs": [ |
97 | | - { |
98 | | - "name": "stderr", |
99 | | - "output_type": "stream", |
100 | | - "text": [ |
101 | | - "/home/apbarret/mambaforge/envs/smap-tutorial/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", |
102 | | - " from .autonotebook import tqdm as notebook_tqdm\n" |
103 | | - ] |
104 | | - } |
105 | | - ], |
| 96 | + "outputs": [], |
106 | 97 | "source": [ |
107 | 98 | "from pathlib import Path # used for creating paths and listing directory contents\n", |
108 | 99 | "import earthaccess # used for authentication and searching for downloading the data" |
|
123 | 114 | }, |
124 | 115 | { |
125 | 116 | "cell_type": "code", |
126 | | - "execution_count": 2, |
| 117 | + "execution_count": null, |
127 | 118 | "id": "d47aa955-3d91-4418-85f9-5772f400f712", |
128 | 119 | "metadata": {}, |
129 | 120 | "outputs": [], |
|
152 | 143 | }, |
153 | 144 | { |
154 | 145 | "cell_type": "code", |
155 | | - "execution_count": 5, |
| 146 | + "execution_count": null, |
156 | 147 | "id": "d66e54ff-71dc-422c-9e8a-5b154fa0dbf7", |
157 | 148 | "metadata": {}, |
158 | | - "outputs": [ |
159 | | - { |
160 | | - "name": "stdout", |
161 | | - "output_type": "stream", |
162 | | - "text": [ |
163 | | - "Found: 31\n" |
164 | | - ] |
165 | | - } |
166 | | - ], |
| 149 | + "outputs": [], |
167 | 150 | "source": [ |
168 | 151 | "results = earthaccess.search_data(\n", |
169 | 152 | " short_name = 'SPL3SMP',\n", |
|
185 | 168 | }, |
186 | 169 | { |
187 | 170 | "cell_type": "code", |
188 | | - "execution_count": 6, |
| 171 | + "execution_count": null, |
189 | 172 | "id": "80d938ed-4fe6-4bff-b71a-cce39e7a9bd4", |
190 | 173 | "metadata": {}, |
191 | 174 | "outputs": [], |
|
204 | 187 | }, |
205 | 188 | { |
206 | 189 | "cell_type": "code", |
207 | | - "execution_count": 7, |
| 190 | + "execution_count": null, |
208 | 191 | "id": "467ece65-932a-46e1-9f4c-1b47b628266b", |
209 | 192 | "metadata": {}, |
210 | | - "outputs": [ |
211 | | - { |
212 | | - "name": "stderr", |
213 | | - "output_type": "stream", |
214 | | - "text": [ |
215 | | - "QUEUEING TASKS | : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 31/31 [00:00<00:00, 2450.31it/s]\n", |
216 | | - "PROCESSING TASKS | : 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 31/31 [01:35<00:00, 3.09s/it]\n", |
217 | | - "COLLECTING RESULTS | : 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 31/31 [00:00<00:00, 138617.72it/s]\n" |
218 | | - ] |
219 | | - } |
220 | | - ], |
| 193 | + "outputs": [], |
221 | 194 | "source": [ |
222 | 195 | "smap_files = earthaccess.download(results,DOWNLOAD_PATH)" |
223 | 196 | ] |
|
0 commit comments