Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 40 additions & 43 deletions examples/1_creating_an_OSNAP_section.ipynb
Original file line number Diff line number Diff line change
@@ -1,25 +1,33 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"cell_type": "markdown",
"metadata": {},
"source": [
"# Computing velocity-grid following sections with `sectionate`\n",
"\n",
"In this example, we use the `sectionate.grid_section` function to find the indices for the series of grid cell faces (corresponding to velocity points on an Arakawa \"C-grid\" model such as MOM6) that best approximate a hydrographic section input by the user. In this case, we consider both the West and East sections of the *Overturning of the Subpolar North Atlantic (OSNAP)* observational program.\n",
"\n",
"We consider both cases of MOM6's horizontal grid configurations: non-symmetric (excluding the cell faces at the western and southern edges of the domain; also used in MOM5 and the MITgcm C-grids) and symmetric (including all tracer cell faces)."
]
},
{
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"%load_ext autoreload\n",
"%autoreload 2"
"## Import packages"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sectionate version: 0.5.0\n"
"Sectionate version: 0.3.3\n"
]
}
],
Expand All @@ -33,17 +41,6 @@
"print(f\"Sectionate version: {sectionate.__version__}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Computing velocity-grid following sections with `sectionate`\n",
"\n",
"In this example, we use the `sectionate.grid_section` function to find the indices for the series of grid cell faces (corresponding to velocity points on an Arakawa \"C-grid\" model such as MOM6) that best approximate a hydrographic section input by the user. In this case, we consider both the West and East sections of the *Overturning of the Subpolar North Atlantic (OSNAP)* observational program.\n",
"\n",
"We consider both cases of MOM6's horizontal grid configurations: non-symmetric (excluding the cell faces at the western and southern edges of the domain; also used in MOM5 and the MITgcm C-grids) and symmetric (including all tracer cell faces)."
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -67,7 +64,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -108,7 +105,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -126,7 +123,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -140,7 +137,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -184,7 +181,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -206,7 +203,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -245,7 +242,7 @@
"tags": []
},
"source": [
"### 2. Symmetric grid example (MOM6)"
"### B) Symmetric grid example (MOM6)"
]
},
{
Expand All @@ -257,7 +254,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -277,7 +274,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -297,7 +294,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -311,7 +308,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 11,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -347,7 +344,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -360,7 +357,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 13,
"metadata": {},
"outputs": [
{
Expand All @@ -369,7 +366,7 @@
"(np.float64(-50.0), np.float64(0.0), np.float64(51.0), np.float64(67.0))"
]
},
"execution_count": 14,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
},
Expand Down Expand Up @@ -429,7 +426,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -486,7 +483,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 15,
"metadata": {},
"outputs": [
{
Expand All @@ -512,7 +509,7 @@
" 'Western Europe']"
]
},
"execution_count": 16,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -530,7 +527,7 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": 16,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -581,7 +578,7 @@
},
{
"cell_type": "code",
"execution_count": 18,
"execution_count": 17,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -617,7 +614,7 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": 18,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -631,7 +628,7 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 19,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -676,7 +673,7 @@
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 20,
"metadata": {},
"outputs": [
{
Expand All @@ -697,7 +694,7 @@
" - Section(OSNAP East, [(-44.0, 64.0), (-42.0, 60.5), (-31.0, 59.0), (-28.0, 58.25), (-15.0, 58.0), (-12.5, 57.5), (-9.5, 57.25), (-5.0, 56.75)])"
]
},
"execution_count": 21,
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -719,7 +716,7 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 21,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -739,7 +736,7 @@
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 22,
"metadata": {},
"outputs": [
{
Expand Down
Loading
Loading