Skip to content

Commit 9d28c60

Browse files
authored
Merge pull request #90 from andrewdelman/cloud_compatibility
Update with ecco_access tutorials
2 parents 072f329 + a8ee4ae commit 9d28c60

21 files changed

Lines changed: 17505 additions & 7453 deletions

Intro_to_PO_Tutorials/Geostrophic_balance.ipynb

Lines changed: 3927 additions & 1330 deletions
Large diffs are not rendered by default.

Intro_to_PO_Tutorials/ecco_access

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../ecco_access

Intro_to_PO_Tutorials/ecco_download.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

Intro_to_PO_Tutorials/ecco_po_tutorials.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def mean_weighted_binned(value_field,weighting,bin_field,bin_bounds):
117117
#----------------------------------------------------------------------------------------
118118

119119

120-
def geos_vel_compute(dens_press_filename,grid_filename="~/Downloads/ECCO_V4r4_PODAAC/ECCO_L4_GEOMETRY_LLC0090GRID_V4R4/GRID_GEOMETRY_ECCO_V4r4_native_llc0090.nc",fc_filename="llc_13tile_fc.txt"):
120+
def geos_vel_compute(dens_press_filename,grid_filename="~/Downloads/ECCO_V4r4_PODAAC/ECCO_L4_GEOMETRY_LLC0090GRID_V4R4/GRID_GEOMETRY_ECCO_V4r4_native_llc0090.nc",subset=None):
121121
"""
122122
This routine computes geostrophic velocities from an input netCDF file containing ECCO v4r4 density and pressure anomalies on the native llc90 grid.
123123
@@ -126,8 +126,8 @@ def geos_vel_compute(dens_press_filename,grid_filename="~/Downloads/ECCO_V4r4_PO
126126
dens_press_filename: the name (including path if not in current directory) of the netCDF file containing the density and pressure anomalies
127127
128128
grid_filename: the name (including path if not in current directory) of the netCDF file containing the latitudes ('YC') and grid parameters ('dxC','dyC') needed to compute horizontal derivatives
129-
130-
fc_filename: text file containing a Python dictionary specifying the tile/face connections in the ECCO llc90 grid
129+
130+
subset: dictionary containing dimension names and index values, e.g., {'k': [0,1,2]}. The index values can be integers, slice objects, or arrays. This object is passed directly to xarray.Dataset.isel as an indexer. If not specified, the entire global domain will be used.
131131
"""
132132

133133
import numpy as np
@@ -141,8 +141,7 @@ def geos_vel_compute(dens_press_filename,grid_filename="~/Downloads/ECCO_V4r4_PO
141141
import ecco_v4_py as ecco
142142

143143
# load file into workspace
144-
ds_denspress = xr.open_dataset(dens_press_filename, data_vars='minimal',\
145-
coords='minimal', compat='override')
144+
ds_denspress = xr.open_dataset(dens_press_filename)
146145

147146
densanom = ds_denspress.RHOAnoma
148147

Intro_to_PO_Tutorials/ecco_s3_retrieve.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

Tutorials_as_Jupyter_Notebooks/ECCO_v4_Example_MHT.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"- **ECCO_L4_GEOMETRY_LLC0090GRID_V4R4**\n",
4343
"- **ECCO_L4_OCEAN_3D_TEMPERATURE_FLUX_LLC0090GRID_MONTHLY_V4R4** (1992-2017)\n",
4444
"\n",
45-
"If you haven't yet been through the [download tutorial](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html) or used the [ecco_download module](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html#ECCO_download-module), it may help you to review that information before downloading the datasets."
45+
"If you haven't yet been through the [download tutorial](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html) or used the [ecco_download module](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html#ECCO_download-module:-the-quick-and-easy-method), it may help you to review that information before downloading the datasets."
4646
]
4747
},
4848
{

Tutorials_as_Jupyter_Notebooks/ECCO_v4_Example_OSNAP.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"- **ECCO_L4_OCEAN_3D_VOLUME_FLUX_LLC0090GRID_MONTHLY_V4R4** (1992-2017)\n",
3030
"- **ECCO_L4_OCEAN_3D_TEMPERATURE_FLUX_LLC0090GRID_MONTHLY_V4R4** (1992-2017)\n",
3131
"\n",
32-
"If you need to download ECCO output and haven't yet been through the [download tutorial](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html) or used the [ecco_download module](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html#ECCO_download-module), it may help you to review that information before downloading the datasets."
32+
"If you need to download ECCO output and haven't yet been through the [download tutorial](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html) or used the [ecco_download module](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html#ECCO_download-module:-the-quick-and-easy-method), it may help you to review that information before downloading the datasets."
3333
]
3434
},
3535
{

Tutorials_as_Jupyter_Notebooks/ECCO_v4_Heat_budget_closure.ipynb

Lines changed: 1 addition & 237 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"- **ECCO_L4_SSH_LLC0090GRID_SNAPSHOT_V4R4** (1993/1/1-2017/1/1, 1st of each month)\n",
8787
"- **ECCO_L4_TEMP_SALINITY_LLC0090GRID_SNAPSHOT_V4R4** (1993/1/1-2017/1/1, 1st of each month)\n",
8888
"\n",
89-
"If you haven't yet been through the [download tutorial](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html) or used the [ecco_download module](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html#ECCO_download-module), it may help you to review that information before downloading the datasets. If you are downloading the snapshots, you may also find the [snaps_monthly_textlist](https://ecco-v4-python-tutorial.readthedocs.io/ECCO_v4_Salt_and_salinity_budget.html#Load-monthly-snapshots) function helpful; it generates a file list of only the snapshot files for the 1st of each month, which you can then download using `wget`."
89+
"If you haven't yet been through the [download tutorial](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html) or used the [ecco_download module](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html#ECCO_download-module:-the-quick-and-easy-method), it may help you to review that information before downloading the datasets. If you are downloading the snapshots, you may also find the [snaps_monthly_textlist](https://ecco-v4-python-tutorial.readthedocs.io/ECCO_v4_Salt_and_salinity_budget.html#Load-monthly-snapshots) function helpful; it generates a file list of only the snapshot files for the 1st of each month, which you can then download using `wget`."
9090
]
9191
},
9292
{
@@ -153,242 +153,6 @@
153153
" client = Client(cluster)"
154154
]
155155
},
156-
{
157-
"cell_type": "code",
158-
"execution_count": 5,
159-
"metadata": {},
160-
"outputs": [
161-
{
162-
"data": {
163-
"text/html": [
164-
"<div>\n",
165-
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\"> </div>\n",
166-
" <div style=\"margin-left: 48px;\">\n",
167-
" <h3 style=\"margin-bottom: 0px;\">Client</h3>\n",
168-
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Client-f7e96805-448d-11ef-bb30-0659db0d1d75</p>\n",
169-
" <table style=\"width: 100%; text-align: left;\">\n",
170-
"\n",
171-
" <tr>\n",
172-
" \n",
173-
" <td style=\"text-align: left;\"><strong>Connection method:</strong> Cluster object</td>\n",
174-
" <td style=\"text-align: left;\"><strong>Cluster type:</strong> distributed.LocalCluster</td>\n",
175-
" \n",
176-
" </tr>\n",
177-
"\n",
178-
" \n",
179-
" <tr>\n",
180-
" <td style=\"text-align: left;\">\n",
181-
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n",
182-
" </td>\n",
183-
" <td style=\"text-align: left;\"></td>\n",
184-
" </tr>\n",
185-
" \n",
186-
"\n",
187-
" </table>\n",
188-
"\n",
189-
" \n",
190-
" <button style=\"margin-bottom: 12px;\" data-commandlinker-command=\"dask:populate-and-launch-layout\" data-commandlinker-args='{\"url\": \"http://127.0.0.1:8787/status\" }'>\n",
191-
" Launch dashboard in JupyterLab\n",
192-
" </button>\n",
193-
" \n",
194-
"\n",
195-
" \n",
196-
" <details>\n",
197-
" <summary style=\"margin-bottom: 20px;\"><h3 style=\"display: inline;\">Cluster Info</h3></summary>\n",
198-
" <div class=\"jp-RenderedHTMLCommon jp-RenderedHTML jp-mod-trusted jp-OutputArea-output\">\n",
199-
" <div style=\"width: 24px; height: 24px; background-color: #e1e1e1; border: 3px solid #9D9D9D; border-radius: 5px; position: absolute;\">\n",
200-
" </div>\n",
201-
" <div style=\"margin-left: 48px;\">\n",
202-
" <h3 style=\"margin-bottom: 0px; margin-top: 0px;\">LocalCluster</h3>\n",
203-
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">8dd31a3f</p>\n",
204-
" <table style=\"width: 100%; text-align: left;\">\n",
205-
" <tr>\n",
206-
" <td style=\"text-align: left;\">\n",
207-
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n",
208-
" </td>\n",
209-
" <td style=\"text-align: left;\">\n",
210-
" <strong>Workers:</strong> 2\n",
211-
" </td>\n",
212-
" </tr>\n",
213-
" <tr>\n",
214-
" <td style=\"text-align: left;\">\n",
215-
" <strong>Total threads:</strong> 2\n",
216-
" </td>\n",
217-
" <td style=\"text-align: left;\">\n",
218-
" <strong>Total memory:</strong> 7.41 GiB\n",
219-
" </td>\n",
220-
" </tr>\n",
221-
" \n",
222-
" <tr>\n",
223-
" <td style=\"text-align: left;\"><strong>Status:</strong> running</td>\n",
224-
" <td style=\"text-align: left;\"><strong>Using processes:</strong> True</td>\n",
225-
"</tr>\n",
226-
"\n",
227-
" \n",
228-
" </table>\n",
229-
"\n",
230-
" <details>\n",
231-
" <summary style=\"margin-bottom: 20px;\">\n",
232-
" <h3 style=\"display: inline;\">Scheduler Info</h3>\n",
233-
" </summary>\n",
234-
"\n",
235-
" <div style=\"\">\n",
236-
" <div>\n",
237-
" <div style=\"width: 24px; height: 24px; background-color: #FFF7E5; border: 3px solid #FF6132; border-radius: 5px; position: absolute;\"> </div>\n",
238-
" <div style=\"margin-left: 48px;\">\n",
239-
" <h3 style=\"margin-bottom: 0px;\">Scheduler</h3>\n",
240-
" <p style=\"color: #9D9D9D; margin-bottom: 0px;\">Scheduler-ff6a6210-b7c0-4a93-a0d6-c154173aed45</p>\n",
241-
" <table style=\"width: 100%; text-align: left;\">\n",
242-
" <tr>\n",
243-
" <td style=\"text-align: left;\">\n",
244-
" <strong>Comm:</strong> tcp://127.0.0.1:38591\n",
245-
" </td>\n",
246-
" <td style=\"text-align: left;\">\n",
247-
" <strong>Workers:</strong> 2\n",
248-
" </td>\n",
249-
" </tr>\n",
250-
" <tr>\n",
251-
" <td style=\"text-align: left;\">\n",
252-
" <strong>Dashboard:</strong> <a href=\"http://127.0.0.1:8787/status\" target=\"_blank\">http://127.0.0.1:8787/status</a>\n",
253-
" </td>\n",
254-
" <td style=\"text-align: left;\">\n",
255-
" <strong>Total threads:</strong> 2\n",
256-
" </td>\n",
257-
" </tr>\n",
258-
" <tr>\n",
259-
" <td style=\"text-align: left;\">\n",
260-
" <strong>Started:</strong> Just now\n",
261-
" </td>\n",
262-
" <td style=\"text-align: left;\">\n",
263-
" <strong>Total memory:</strong> 7.41 GiB\n",
264-
" </td>\n",
265-
" </tr>\n",
266-
" </table>\n",
267-
" </div>\n",
268-
" </div>\n",
269-
"\n",
270-
" <details style=\"margin-left: 48px;\">\n",
271-
" <summary style=\"margin-bottom: 20px;\">\n",
272-
" <h3 style=\"display: inline;\">Workers</h3>\n",
273-
" </summary>\n",
274-
"\n",
275-
" \n",
276-
" <div style=\"margin-bottom: 20px;\">\n",
277-
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
278-
" <div style=\"margin-left: 48px;\">\n",
279-
" <details>\n",
280-
" <summary>\n",
281-
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 0</h4>\n",
282-
" </summary>\n",
283-
" <table style=\"width: 100%; text-align: left;\">\n",
284-
" <tr>\n",
285-
" <td style=\"text-align: left;\">\n",
286-
" <strong>Comm: </strong> tcp://127.0.0.1:46563\n",
287-
" </td>\n",
288-
" <td style=\"text-align: left;\">\n",
289-
" <strong>Total threads: </strong> 1\n",
290-
" </td>\n",
291-
" </tr>\n",
292-
" <tr>\n",
293-
" <td style=\"text-align: left;\">\n",
294-
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:44113/status\" target=\"_blank\">http://127.0.0.1:44113/status</a>\n",
295-
" </td>\n",
296-
" <td style=\"text-align: left;\">\n",
297-
" <strong>Memory: </strong> 3.70 GiB\n",
298-
" </td>\n",
299-
" </tr>\n",
300-
" <tr>\n",
301-
" <td style=\"text-align: left;\">\n",
302-
" <strong>Nanny: </strong> tcp://127.0.0.1:37769\n",
303-
" </td>\n",
304-
" <td style=\"text-align: left;\"></td>\n",
305-
" </tr>\n",
306-
" <tr>\n",
307-
" <td colspan=\"2\" style=\"text-align: left;\">\n",
308-
" <strong>Local directory: </strong> /tmp/dask-scratch-space/worker-g38oihrh\n",
309-
" </td>\n",
310-
" </tr>\n",
311-
"\n",
312-
" \n",
313-
"\n",
314-
" \n",
315-
"\n",
316-
" </table>\n",
317-
" </details>\n",
318-
" </div>\n",
319-
" </div>\n",
320-
" \n",
321-
" <div style=\"margin-bottom: 20px;\">\n",
322-
" <div style=\"width: 24px; height: 24px; background-color: #DBF5FF; border: 3px solid #4CC9FF; border-radius: 5px; position: absolute;\"> </div>\n",
323-
" <div style=\"margin-left: 48px;\">\n",
324-
" <details>\n",
325-
" <summary>\n",
326-
" <h4 style=\"margin-bottom: 0px; display: inline;\">Worker: 1</h4>\n",
327-
" </summary>\n",
328-
" <table style=\"width: 100%; text-align: left;\">\n",
329-
" <tr>\n",
330-
" <td style=\"text-align: left;\">\n",
331-
" <strong>Comm: </strong> tcp://127.0.0.1:46519\n",
332-
" </td>\n",
333-
" <td style=\"text-align: left;\">\n",
334-
" <strong>Total threads: </strong> 1\n",
335-
" </td>\n",
336-
" </tr>\n",
337-
" <tr>\n",
338-
" <td style=\"text-align: left;\">\n",
339-
" <strong>Dashboard: </strong> <a href=\"http://127.0.0.1:40033/status\" target=\"_blank\">http://127.0.0.1:40033/status</a>\n",
340-
" </td>\n",
341-
" <td style=\"text-align: left;\">\n",
342-
" <strong>Memory: </strong> 3.70 GiB\n",
343-
" </td>\n",
344-
" </tr>\n",
345-
" <tr>\n",
346-
" <td style=\"text-align: left;\">\n",
347-
" <strong>Nanny: </strong> tcp://127.0.0.1:46521\n",
348-
" </td>\n",
349-
" <td style=\"text-align: left;\"></td>\n",
350-
" </tr>\n",
351-
" <tr>\n",
352-
" <td colspan=\"2\" style=\"text-align: left;\">\n",
353-
" <strong>Local directory: </strong> /tmp/dask-scratch-space/worker-bmmtim47\n",
354-
" </td>\n",
355-
" </tr>\n",
356-
"\n",
357-
" \n",
358-
"\n",
359-
" \n",
360-
"\n",
361-
" </table>\n",
362-
" </details>\n",
363-
" </div>\n",
364-
" </div>\n",
365-
" \n",
366-
"\n",
367-
" </details>\n",
368-
"</div>\n",
369-
"\n",
370-
" </details>\n",
371-
" </div>\n",
372-
"</div>\n",
373-
" </details>\n",
374-
" \n",
375-
"\n",
376-
" </div>\n",
377-
"</div>"
378-
],
379-
"text/plain": [
380-
"<Client: 'tcp://127.0.0.1:38591' processes=2 threads=2, memory=7.41 GiB>"
381-
]
382-
},
383-
"execution_count": 5,
384-
"metadata": {},
385-
"output_type": "execute_result"
386-
}
387-
],
388-
"source": [
389-
"client"
390-
]
391-
},
392156
{
393157
"cell_type": "code",
394158
"execution_count": 4,

Tutorials_as_Jupyter_Notebooks/ECCO_v4_Loading_the_ECCOv4_native_model_grid_parameters.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"\n",
1313
"## Introduction\n",
1414
"\n",
15-
"The ECCOv4 model grid parameters are provided as a single NetCDF file. It can be downloaded using the `ecco_podaac_download` function as described in the [download tutorial](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html#ECCO_download-module). The ShortName for the dataset is **ECCO_L4_GEOMETRY_LLC0090GRID_V4R4**. The grid parameters file has no time dimension, but `ecco_podaac_download` requires a StartDate and EndDate to be specified; any date in the range 1992-2017 can be used."
15+
"The ECCOv4 model grid parameters are provided as a single NetCDF file. It can be downloaded using the `ecco_podaac_download` function as described in the [download tutorial](https://ecco-v4-python-tutorial.readthedocs.io/Downloading_ECCO_Datasets_from_PODAAC_Python.html#ECCO_download-module:-the-quick-and-easy-method). The ShortName for the dataset is **ECCO_L4_GEOMETRY_LLC0090GRID_V4R4**. The grid parameters file has no time dimension, but `ecco_podaac_download` requires a StartDate and EndDate to be specified; any date in the range 1992-2017 can be used."
1616
]
1717
},
1818
{

0 commit comments

Comments
 (0)