|
5 | 5 | "metadata": {}, |
6 | 6 | "source": [ |
7 | 7 | "# Part 1: Geostrophic balance\n", |
8 | | - "Andrew Delman, updated 2023-01-23.\n", |
| 8 | + "Andrew Delman, updated 2023-12-22.\n", |
9 | 9 | "\n", |
10 | 10 | "## Objectives\n", |
11 | 11 | "\n", |
|
118 | 118 | "Help on function ecco_podaac_download in module ecco_download:\n", |
119 | 119 | "\n", |
120 | 120 | "ecco_podaac_download(ShortName, StartDate, EndDate, download_root_dir=None, n_workers=6, force_redownload=False)\n", |
121 | | - " This routine downloads ECCO datasets from PO.DAAC. It is adapted from the Jupyter notebooks created by Jack McNelis and Ian Fenty (https://github.com/ECCO-GROUP/ECCO-ACCESS/blob/master/PODAAC/Downloading_ECCO_datasets_from_PODAAC/README.md) and modified by Andrew Delman (https://ecco-v4-python-tutorial.readthedocs.io).\n", |
| 121 | + " This routine downloads ECCO datasets from PO.DAAC. It is adapted from the Jupyter notebooks \n", |
| 122 | + " created by Jack McNelis and Ian Fenty (https://github.com/ECCO-GROUP/ECCO-ACCESS/blob/master/PODAAC/Downloading_ECCO_datasets_from_PODAAC/README.md)\n", |
| 123 | + " and modified by Andrew Delman (https://ecco-v4-python-tutorial.readthedocs.io).\n", |
122 | 124 | " \n", |
123 | 125 | " Parameters\n", |
124 | 126 | " ----------\n", |
125 | | - " ShortName: the ShortName of the dataset (can be identified from https://search.earthdata.nasa.gov/search?fpj=ECCO, selecting the \"i\" information button and the ShortName will appear in a gray box in the upper-left corner)\n", |
126 | 127 | " \n", |
127 | | - " StartDate: the start of the time range to be downloaded, expressed in the format \"YYYY-MM-DD\"\n", |
| 128 | + " ShortName: str, the ShortName that identifies the dataset on PO.DAAC.\n", |
128 | 129 | " \n", |
129 | | - " EndDate: the end of the time range to be downloaded, expressed in the format \"YYYY-MM-DD\"\n", |
| 130 | + " StartDate,EndDate: str, in 'YYYY', 'YYYY-MM', or 'YYYY-MM-DD' format, \n", |
| 131 | + " define date range [StartDate,EndDate] for download.\n", |
| 132 | + " EndDate is included in the time range (unlike typical Python ranges).\n", |
| 133 | + " ECCOv4r4 date range is '1992-01-01' to '2017-12-31'.\n", |
| 134 | + " For 'SNAPSHOT' datasets, an additional day is added to EndDate to enable closed budgets\n", |
| 135 | + " within the specified date range.\n", |
130 | 136 | " \n", |
131 | | - " download_root_dir: path of the parent directory to download ECCO files\n", |
| 137 | + " n_workers: int, number of workers to use in concurrent downloads.\n", |
132 | 138 | " \n", |
133 | | - " n_workers: number of workers to use in concurrent downloads\n", |
134 | | - " \n", |
135 | | - " force_redownload: if True, existing files will be redownloaded and replaced; if False, existing files will not be replaced\n", |
| 139 | + " force_redownload: bool, if True, existing files will be redownloaded and replaced;\n", |
| 140 | + " if False, existing files will not be replaced.\n", |
136 | 141 | "\n" |
137 | 142 | ] |
138 | 143 | } |
|
158 | 163 | "output_type": "stream", |
159 | 164 | "text": [ |
160 | 165 | "created download directory C:\\Users\\adelman\\Downloads\\ECCO_V4r4_PODAAC\\ECCO_L4_OCEAN_VEL_LLC0090GRID_MONTHLY_V4R4\n", |
161 | | - "{'ShortName': 'ECCO_L4_OCEAN_VEL_LLC0090GRID_MONTHLY_V4R4', 'temporal': '2000-01-02,2000-01-31'}\n", |
162 | 166 | "\n", |
163 | | - "Total number of matching granules: 1\n" |
164 | | - ] |
165 | | - }, |
166 | | - { |
167 | | - "name": "stderr", |
168 | | - "output_type": "stream", |
169 | | - "text": [ |
170 | | - "100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:08<00:00, 8.11s/it]" |
171 | | - ] |
172 | | - }, |
173 | | - { |
174 | | - "name": "stdout", |
175 | | - "output_type": "stream", |
176 | | - "text": [ |
| 167 | + "Total number of matching granules: 1\n", |
| 168 | + "DL Progress: 100%|###########################| 1/1 [00:06<00:00, 6.01s/it]\n", |
177 | 169 | "\n", |
178 | 170 | "=====================================\n", |
179 | 171 | "total downloaded: 30.6 Mb\n", |
180 | | - "avg download speed: 3.76 Mb/s\n" |
181 | | - ] |
182 | | - }, |
183 | | - { |
184 | | - "name": "stderr", |
185 | | - "output_type": "stream", |
186 | | - "text": [ |
187 | | - "\n" |
| 172 | + "avg download speed: 5.07 Mb/s\n", |
| 173 | + "Time spent = 6.032305955886841 seconds\n" |
188 | 174 | ] |
189 | 175 | } |
190 | 176 | ], |
|
193 | 179 | "# to default path ~/Downloads/ECCO_V4r4_PODAAC/\n", |
194 | 180 | "vel_monthly_shortname = \"ECCO_L4_OCEAN_VEL_LLC0090GRID_MONTHLY_V4R4\"\n", |
195 | 181 | "ecco_podaac_download(ShortName=vel_monthly_shortname,\\\n", |
196 | | - " StartDate=\"2000-01-02\",EndDate=\"2000-01-31\",download_root_dir=None,\\\n", |
| 182 | + " StartDate=\"2000-01-01\",EndDate=\"2000-01-31\",download_root_dir=None,\\\n", |
197 | 183 | " n_workers=6,force_redownload=False)" |
198 | 184 | ] |
199 | 185 | }, |
|
207 | 193 | "output_type": "stream", |
208 | 194 | "text": [ |
209 | 195 | "created download directory C:\\Users\\adelman\\Downloads\\ECCO_V4r4_PODAAC\\ECCO_L4_DENS_STRAT_PRESS_LLC0090GRID_MONTHLY_V4R4\n", |
210 | | - "{'ShortName': 'ECCO_L4_DENS_STRAT_PRESS_LLC0090GRID_MONTHLY_V4R4', 'temporal': '2000-01-02,2000-01-31'}\n", |
211 | 196 | "\n", |
212 | | - "Total number of matching granules: 1\n" |
213 | | - ] |
214 | | - }, |
215 | | - { |
216 | | - "name": "stderr", |
217 | | - "output_type": "stream", |
218 | | - "text": [ |
219 | | - "100%|████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:06<00:00, 6.12s/it]" |
220 | | - ] |
221 | | - }, |
222 | | - { |
223 | | - "name": "stdout", |
224 | | - "output_type": "stream", |
225 | | - "text": [ |
| 197 | + "Total number of matching granules: 1\n", |
| 198 | + "DL Progress: 100%|###########################| 1/1 [00:07<00:00, 7.11s/it]\n", |
226 | 199 | "\n", |
227 | 200 | "=====================================\n", |
228 | 201 | "total downloaded: 30.98 Mb\n", |
229 | | - "avg download speed: 5.05 Mb/s\n" |
230 | | - ] |
231 | | - }, |
232 | | - { |
233 | | - "name": "stderr", |
234 | | - "output_type": "stream", |
235 | | - "text": [ |
236 | | - "\n" |
| 202 | + "avg download speed: 4.36 Mb/s\n", |
| 203 | + "Time spent = 7.113083362579346 seconds\n" |
237 | 204 | ] |
238 | 205 | } |
239 | 206 | ], |
|
242 | 209 | "# to default path ~/Downloads/ECCO_V4r4_PODAAC/\n", |
243 | 210 | "denspress_monthly_shortname = \"ECCO_L4_DENS_STRAT_PRESS_LLC0090GRID_MONTHLY_V4R4\"\n", |
244 | 211 | "ecco_podaac_download(ShortName=denspress_monthly_shortname,\\\n", |
245 | | - " StartDate=\"2000-01-02\",EndDate=\"2000-01-31\",download_root_dir=None,\\\n", |
| 212 | + " StartDate=\"2000-01-01\",EndDate=\"2000-01-31\",download_root_dir=None,\\\n", |
246 | 213 | " n_workers=6,force_redownload=False)" |
247 | 214 | ] |
248 | 215 | }, |
|
265 | 232 | "output_type": "stream", |
266 | 233 | "text": [ |
267 | 234 | "created download directory C:\\Users\\adelman\\Downloads\\ECCO_V4r4_PODAAC\\ECCO_L4_OCEAN_VEL_LLC0090GRID_DAILY_V4R4\n", |
268 | | - "{'ShortName': 'ECCO_L4_OCEAN_VEL_LLC0090GRID_DAILY_V4R4', 'temporal': '2000-01-01,2000-01-01'}\n", |
269 | 235 | "\n", |
270 | | - "Total number of matching granules: 2\n" |
271 | | - ] |
272 | | - }, |
273 | | - { |
274 | | - "name": "stderr", |
275 | | - "output_type": "stream", |
276 | | - "text": [ |
277 | | - "100%|████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:07<00:00, 3.97s/it]\n" |
278 | | - ] |
279 | | - }, |
280 | | - { |
281 | | - "name": "stdout", |
282 | | - "output_type": "stream", |
283 | | - "text": [ |
| 236 | + "Total number of matching granules: 1\n", |
| 237 | + "DL Progress: 100%|###########################| 1/1 [00:06<00:00, 6.58s/it]\n", |
284 | 238 | "\n", |
285 | 239 | "=====================================\n", |
286 | | - "total downloaded: 61.36 Mb\n", |
287 | | - "avg download speed: 7.72 Mb/s\n", |
| 240 | + "total downloaded: 30.68 Mb\n", |
| 241 | + "avg download speed: 4.65 Mb/s\n", |
| 242 | + "Time spent = 6.5920562744140625 seconds\n", |
288 | 243 | "created download directory C:\\Users\\adelman\\Downloads\\ECCO_V4r4_PODAAC\\ECCO_L4_DENS_STRAT_PRESS_LLC0090GRID_DAILY_V4R4\n", |
289 | | - "{'ShortName': 'ECCO_L4_DENS_STRAT_PRESS_LLC0090GRID_DAILY_V4R4', 'temporal': '2000-01-01,2000-01-01'}\n", |
290 | 244 | "\n", |
291 | | - "Total number of matching granules: 2\n" |
292 | | - ] |
293 | | - }, |
294 | | - { |
295 | | - "name": "stderr", |
296 | | - "output_type": "stream", |
297 | | - "text": [ |
298 | | - "100%|████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:07<00:00, 3.73s/it]" |
299 | | - ] |
300 | | - }, |
301 | | - { |
302 | | - "name": "stdout", |
303 | | - "output_type": "stream", |
304 | | - "text": [ |
| 245 | + "Total number of matching granules: 1\n", |
| 246 | + "DL Progress: 100%|###########################| 1/1 [00:04<00:00, 4.97s/it]\n", |
305 | 247 | "\n", |
306 | 248 | "=====================================\n", |
307 | | - "total downloaded: 62.39 Mb\n", |
308 | | - "avg download speed: 8.35 Mb/s\n" |
309 | | - ] |
310 | | - }, |
311 | | - { |
312 | | - "name": "stderr", |
313 | | - "output_type": "stream", |
314 | | - "text": [ |
315 | | - "\n" |
| 249 | + "total downloaded: 31.2 Mb\n", |
| 250 | + "avg download speed: 6.27 Mb/s\n", |
| 251 | + "Time spent = 4.976189613342285 seconds\n" |
316 | 252 | ] |
317 | 253 | } |
318 | 254 | ], |
|
348 | 284 | "output_type": "stream", |
349 | 285 | "text": [ |
350 | 286 | "created download directory C:\\Users\\adelman\\Downloads\\ECCO_V4r4_PODAAC\\ECCO_L4_GEOMETRY_LLC0090GRID_V4R4\n", |
351 | | - "{'ShortName': 'ECCO_L4_GEOMETRY_LLC0090GRID_V4R4', 'temporal': '2000-01-01,2000-01-01'}\n", |
352 | 287 | "\n", |
353 | 288 | "Total number of matching granules: 1\n", |
354 | | - "\n", |
355 | | - "GRID_GEOMETRY_ECCO_V4r4_native_llc0090.nc already exists, and force=False, not re-downloading\n" |
356 | | - ] |
357 | | - }, |
358 | | - { |
359 | | - "name": "stderr", |
360 | | - "output_type": "stream", |
361 | | - "text": [ |
362 | | - "100%|████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<?, ?it/s]" |
363 | | - ] |
364 | | - }, |
365 | | - { |
366 | | - "name": "stdout", |
367 | | - "output_type": "stream", |
368 | | - "text": [ |
| 289 | + "DL Progress: 100%|###########################| 1/1 [00:03<00:00, 3.74s/it]\n", |
369 | 290 | "\n", |
370 | 291 | "=====================================\n", |
371 | | - "total downloaded: 0.0 Mb\n", |
372 | | - "avg download speed: 0.0 Mb/s\n" |
373 | | - ] |
374 | | - }, |
375 | | - { |
376 | | - "name": "stderr", |
377 | | - "output_type": "stream", |
378 | | - "text": [ |
379 | | - "\n" |
| 292 | + "total downloaded: 8.57 Mb\n", |
| 293 | + "avg download speed: 2.29 Mb/s\n", |
| 294 | + "Time spent = 3.7480597496032715 seconds\n" |
380 | 295 | ] |
381 | 296 | } |
382 | 297 | ], |
|
0 commit comments