Skip to content

Commit 008afec

Browse files
authored
Merge pull request #44 from andrewdelman/v4r4_tut_updates
V4r4 tut updates
2 parents 2ade3cf + feba35f commit 008afec

12 files changed

Lines changed: 7907 additions & 758 deletions

ECCO-ACCESS/Downloading_ECCO_datasets_from_PODAAC/Tutorial_Python3_Jupyter_Notebook_Downloading_ECCO_Datasets_from_PODAAC.ipynb

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
"source": [
88
"# Using Python to Download ECCO Datasets\n",
99
"\n",
10-
"**Note: This notebook was modified by Andrew Delman (updated 2023-01-12) from the tutorial on the** [ECCO-GROUP Github](https://github.com/ECCO-GROUP/ECCO-ACCESS/blob/master/PODAAC/Downloading_ECCO_datasets_from_PODAAC/Tutorial_Python3_Jupyter_Notebook_Downloading_ECCO_Datasets_from_PODAAC.ipynb) **by Jack McNelis and Ian Fenty, Version 1.1 dated 2021-06-25.**\n",
10+
"**Note: This notebook was modified by Andrew Delman (updated 2023-01-19) from the tutorial on the** [ECCO-GROUP Github](https://github.com/ECCO-GROUP/ECCO-ACCESS/blob/master/PODAAC/Downloading_ECCO_datasets_from_PODAAC/Tutorial_Python3_Jupyter_Notebook_Downloading_ECCO_Datasets_from_PODAAC.ipynb) **by Jack McNelis and Ian Fenty, Version 1.1 dated 2021-06-25.**\n",
1111
"\n",
1212
"This Jupyter notebook provides instructions and Python code for downloading a set of granules (files) for an ECCO \"Dataset\" hosted by PO.DAAC. The focus is on downloading datasets in the lat-lon-cap 90 (llc90) native grid of the ECCO v4 simulations, since the tutorials mostly use output on the native grid. If you're new to this grid geometry, don't worry! The ecco_v4_py package discussed in the previous tutorial will help you load the ECCO output, make computations, and plot the results while hardly needing to interact with the model grid.\n",
1313
"\n",
14-
"The example ECCO Dataset used in this tutorial is \"ECCO Sea Surface Height - Daily Mean llc90 Grid (Version 4 Release 4)\" which provides daily mean sea surface height on the native llc90 grid ([10.5067/ECL5D-SSH44](https://doi.org/10.5067/ECL5D-SSH44)). \n",
14+
"The example ECCO Dataset used in this tutorial is \"ECCO Sea Surface Height - Daily Mean llc90 Grid (Version 4 Release 4)\" which provides daily mean sea surface height on the native llc90 grid ([10.5067/ECL5D-SSH44](https://doi.org/10.5067/ECL5D-SSH44)).\n",
1515
"\n",
16-
"These data can also be accessed directly through the [NASA Earthdata web interface](https://search.earthdata.nasa.gov/search?fpj=ECCO). You will need to set up a NASA Earthdata account if you do not have one already.\n",
16+
"These data can also be accessed directly through [NASA Earthdata search](https://search.earthdata.nasa.gov/search?fpj=ECCO). You will need to set up a NASA Earthdata account if you do not have one already. There is [a nice graphical interface](https://www.ecco-group.org/datasets.htm) to sort through the ECCO datasets available from PO.DAAC.\n",
1717
"\n",
1818
"> Tip: if you are already familiar with Python and ECCO output, and have edited your `netrc` file as described [below](#Earthdata-Login-Requirements), you can download the [ECCO_download](https://raw.githubusercontent.com/ECCO-GROUP/ECCO-v4-Python-Tutorial/master/ECCO-ACCESS/Downloading_ECCO_datasets_from_PODAAC/ecco_download.py) module. Then import it to your code using `from ecco_download import *` and call the function `ecco_podaac_download` to start downloading. You will need to know the ShortName of the dataset you want, which you can look up using the variable lists [here](https://github.com/ECCO-GROUP/ECCO-v4-Python-Tutorial/tree/master/varlist). To see the syntax of the `ecco_podaac_download` function use `help(ecco_podaac_download)`, or see the end of this tutorial for an example.\n",
1919
"\n",
@@ -301,21 +301,21 @@
301301
"id": "7f574cc9",
302302
"metadata": {},
303303
"source": [
304-
"## ECCO output structure on PO.DAAC"
304+
"## ECCO output structure on PO.DAAC (NASA Earthdata Cloud)"
305305
]
306306
},
307307
{
308308
"cell_type": "markdown",
309309
"id": "1bdccec3",
310310
"metadata": {},
311311
"source": [
312-
"On the PO.DAAC Cloud, ECCO output is organized in the following hierarchy:\n",
312+
"On PO.DAAC and in the NASA Earthdata Cloud, ECCO output is organized in the following hierarchy:\n",
313313
"\n",
314314
"- **Dataset:** Typically contains a few variables, spanning the time range of the ECCO v4r4 output (currently 1992-2017). Most datasets are divided (in the time dimension) into hundreds or thousands of granules.\n",
315315
"\n",
316316
" - **Granule:** Dataset variables at a specific time (monthly mean, daily mean, or snapshot). Exceptions are 1-D time series where the entire dataset only consists of one granule.\n",
317317
"\n",
318-
" - **Variable:** A specific geophysical parameter (or flux) representing the state of the ocean, atmosphere, or sea ice/snow cover.\n",
318+
" - **Variable:** A specific geophysical parameter (or flux) representing the state of the ocean, atmosphere, or sea ice/snow cover. Individual variables are not visible through the NASA Earthdata website, but can be seen after a granule file has been opened.\n",
319319
"\n",
320320
"\n",
321321
"Each dataset has a dataset code called a `ShortName` which is used to identify it on the cloud. In order to download particular variable(s), you need to identify the `ShortName` associated with the dataset containing those variables. You can search for the variables in the linked text files below, or download these files for your reference.\n",
@@ -326,7 +326,14 @@
326326
"\n",
327327
"[ECCO v4r4 llc90 Grid Dataset Variables - Daily Means](https://raw.githubusercontent.com/ECCO-GROUP/ECCO-v4-Python-Tutorial/master/varlist/v4r4_nctiles_daily_varlist.txt)\n",
328328
"\n",
329-
"[ECCO v4r4 llc90 Grid Dataset Variables - Snapshots](https://raw.githubusercontent.com/ECCO-GROUP/ECCO-v4-Python-Tutorial/master/varlist/v4r4_nctiles_snapshots_varlist.txt)\n",
329+
"[ECCO v4r4 llc90 Grid Dataset Variables - Daily Snapshots](https://raw.githubusercontent.com/ECCO-GROUP/ECCO-v4-Python-Tutorial/master/varlist/v4r4_nctiles_snapshots_varlist.txt)\n",
330+
"\n",
331+
"[ECCO v4r4 0.5-Deg Interp Grid Dataset Variables - Monthly Means](https://raw.githubusercontent.com/ECCO-GROUP/ECCO-v4-Python-Tutorial/master/varlist/v4r4_latlon_monthly_varlist.txt)\n",
332+
"\n",
333+
"[ECCO v4r4 0.5-Deg Interp Grid Dataset Variables - Daily Means](https://raw.githubusercontent.com/ECCO-GROUP/ECCO-v4-Python-Tutorial/master/varlist/v4r4_latlon_daily_varlist.txt)\n",
334+
"\n",
335+
"[ECCO v4r4 Time Series and Grid Parameters](https://raw.githubusercontent.com/ECCO-GROUP/ECCO-v4-Python-Tutorial/master/varlist/v4r4_tseries_grid_varlist.txt)\n",
336+
"\n",
330337
"\n",
331338
"Note that unlike earlier releases of ECCO v4, in v4r4 all monthly mean variables are also available for download as daily means. Snapshots (typically at daily intervals) are available for a few variables, and can be used to help close budgets as shown in later tutorials."
332339
]

ECCO-ACCESS/Downloading_ECCO_datasets_from_PODAAC/ecco_download.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def ecco_podaac_download(ShortName,StartDate,EndDate,download_root_dir=None,n_wo
3434
from pathlib import Path
3535
from platform import system
3636
from netrc import netrc
37-
from os.path import basename, isfile, isdir, join
37+
from os.path import basename, isfile, isdir, join, expanduser
3838
# progress bar
3939
from tqdm import tqdm
4040
# library to download files
@@ -43,7 +43,6 @@ def ecco_podaac_download(ShortName,StartDate,EndDate,download_root_dir=None,n_wo
4343
# if no download directory specified, set directory under user's home directory
4444
if download_root_dir==None:
4545
import sys
46-
from os.path import expanduser
4746
user_home_dir = expanduser('~')
4847
download_root_dir = Path(user_home_dir + '/Downloads/ECCO_V4r4_PODAAC')
4948
else:

Tutorials_as_Jupyter_Notebooks/ECCO_v4_Coordinates_and_Dimensions_of_ECCOv4_NetCDF_files.ipynb

Lines changed: 5306 additions & 428 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)