Skip to content

Commit aa3b43a

Browse files
committed
added J.E. Tesdal Heat Budget Closure Tutorial
1 parent b2f2984 commit aa3b43a

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

Tutorials_as_Jupyter_Notebooks/ECCO_v4_Heat_budget_closure.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,7 @@
21652165
"name": "python",
21662166
"nbconvert_exporter": "python",
21672167
"pygments_lexer": "ipython3",
2168-
"version": "3.7.2"
2168+
"version": "3.8.5"
21692169
}
21702170
},
21712171
"nbformat": 4,

Tutorials_as_Python_Files/ECCO_v4_Heat_budget_closure.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,25 +656,30 @@
656656
# Load the geothermal heat flux using the routine 'read_llc_to_tiles'
657657
geoflx = ecco.read_llc_to_tiles(base_dir, 'geothermalFlux.bin')
658658

659-
# > **Note**: Geothermal flux needs to be saved as an xarray data array with the same format as the model output. In order to reformat the loaded data array the byte-ordering needs to be changed.
660659

661660
# The geothermal flux dataset needs to be saved as an xarray data array with the same format as the model output.
662661

663662
# In[56]:
664663

664+
665665
# Convert numpy array to an xarray DataArray with matching dimensions as the monthly mean fields
666666
geoflx_llc = xr.DataArray(geoflx,coords={'tile': ecco_monthly_mean.tile.values,
667667
'j': ecco_monthly_mean.j.values,
668668
'i': ecco_monthly_mean.i.values},dims=['tile','j','i'])
669669

670+
671+
# In[ ]:
672+
673+
670674
plt.figure(figsize=(15,5));
671675

672676
ecco.plot_proj_to_latlon_grid(ecco_grid.XC, ecco_grid.YC, geoflx_llc,show_colorbar=True,cmap='magma',
673677
user_lon_0=-67, dx=0.2, dy=0.2)
674678
plt.title(r'Geothermal heat flux [W m$^{-2}$]', fontsize=16)
675679
plt.show()
676680

677-
# Geothermal flux needs to be a three dimensional field since the sources are distributed along the ocean floor at various depths. This requires a three dimensional mask (see below).
681+
682+
# Geothermal flux needs to be a three dimensional field since the sources are distributed along the ocean floor at various depths. This requires a three dimensional mask.
678683

679684
# In[57]:
680685

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

doc/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ The `ecco_v4_py`_ package used in this tutorial was inspired by the `xmitgcm`_ p
7474
ECCO_v4_Example_MHT.ipynb
7575
ECCO_v4_Example_OSNAP.ipynb
7676
ECCO_v4_Volume_budget_closure.ipynb
77+
ECCO_v4_Heat_budget_closure.ipynb
7778

7879
.. toctree::
7980
:maxdepth: 2

0 commit comments

Comments
 (0)