Skip to content

Commit

Permalink
Process tutorial notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 11, 2024
1 parent 15b7096 commit 24e90bc
Show file tree
Hide file tree
Showing 51 changed files with 695 additions and 344 deletions.
90 changes: 67 additions & 23 deletions tutorials/W1D2_Ocean-AtmosphereReanalysis/W1D2_Tutorial6.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"execution": {},
"tags": [
"colab"
]
Expand All @@ -81,7 +82,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"import xarray as xr\n",
Expand All @@ -98,7 +101,8 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form"
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -126,7 +130,8 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form"
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
Expand All @@ -153,7 +158,8 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form"
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
Expand All @@ -171,6 +177,7 @@
"execution_count": null,
"metadata": {
"cellView": "form",
"execution": {},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -226,7 +233,10 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
"# @title Submit your feedback\n",
Expand All @@ -238,6 +248,7 @@
"execution_count": null,
"metadata": {
"cellView": "form",
"execution": {},
"pycharm": {
"name": "#%%\n"
},
Expand All @@ -260,7 +271,10 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
"# @title Submit your feedback\n",
Expand All @@ -283,7 +297,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# import preprocessed ECCO data. This data is full depth temperature data over 1992 to 2016 (annual mean)\n",
Expand Down Expand Up @@ -311,7 +327,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# Quick plot of the ocean temperature in Kelvin\n",
Expand All @@ -332,7 +350,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# take the temporal mean over the period 1992 to 1994\n",
Expand All @@ -354,7 +374,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# plot the zonal mean section of this data\n",
Expand Down Expand Up @@ -394,7 +416,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"theta_area_int = (\n",
Expand All @@ -405,7 +429,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# define reference density of salt water and the specific heat capacity\n",
Expand Down Expand Up @@ -460,7 +486,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"area_of_ocean = (\n",
Expand Down Expand Up @@ -490,7 +518,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# to_remove explanation\n",
Expand All @@ -504,7 +534,8 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form"
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -535,7 +566,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# this cell may take a while to run!\n",
Expand Down Expand Up @@ -617,7 +650,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"fig, ax = plt.subplots()\n",
Expand Down Expand Up @@ -658,7 +693,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# to_remove explanation\n",
Expand All @@ -672,7 +709,8 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form"
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -701,7 +739,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# first let's plot where heat is stored in the mean\n",
Expand Down Expand Up @@ -755,7 +795,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# we already defined an object that's the mean over years 1992 to 1994 (subset_theta)\n",
Expand Down Expand Up @@ -783,7 +825,9 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"execution": {}
},
"outputs": [],
"source": [
"# plot 2 maps to compare changes in heat content in those two layers\n",
Expand Down Expand Up @@ -902,7 +946,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.18"
"version": "3.9.20"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,23 @@
"tabs = widgets.Tab()\n",
"tabs.children = tab_contents\n",
"for i in range(len(tab_contents)):\n",
" tabs.set_title(i, video_ids[i][0])\n",
" tabs.set_title(i, video_ids[i][0])\n",
"display(tabs)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
"# @title Submit your feedback\n",
"content_review(f\"{feedback_prefix}_Oceans_Role_in_Climate_Video\")"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -255,6 +268,19 @@
"IFrame(src=f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\", width=854, height=480)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
"# @title Submit your feedback\n",
"content_review(f\"{feedback_prefix}_Oceans_Role_in_Climate_Slides\")"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -920,7 +946,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.20"
}
},
"nbformat": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,23 @@
"tabs = widgets.Tab()\n",
"tabs.children = tab_contents\n",
"for i in range(len(tab_contents)):\n",
" tabs.set_title(i, video_ids[i][0])\n",
" tabs.set_title(i, video_ids[i][0])\n",
"display(tabs)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
"# @title Submit your feedback\n",
"content_review(f\"{feedback_prefix}_Oceans_Role_in_Climate_Video\")"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -255,6 +268,19 @@
"IFrame(src=f\"https://mfr.ca-1.osf.io/render?url=https://osf.io/{link_id}/?direct%26mode=render%26action=download%26mode=render\", width=854, height=480)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"execution": {}
},
"outputs": [],
"source": [
"# @title Submit your feedback\n",
"content_review(f\"{feedback_prefix}_Oceans_Role_in_Climate_Slides\")"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -912,7 +938,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.19"
"version": "3.9.20"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 24e90bc

Please sign in to comment.