Skip to content

Commit

Permalink
drop matplotlib
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy committed Aug 24, 2024
1 parent b3e35a3 commit 2098081
Showing 1 changed file with 40 additions and 10 deletions.
50 changes: 40 additions & 10 deletions demos/reanalysis-forced.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"import regional_mom6 as rmom6\n",
"\n",
"import os\n",
"import matplotlib.pyplot as plt\n",
"from pathlib import Path\n",
"from dask.distributed import Client"
]
Expand Down Expand Up @@ -331,21 +330,52 @@
"We can plot our the interpolated initial condition. It’s a good idea to check and ensure things look reasonable, especially near the region’s boundaries."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The initial condition for the free surface:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fig, axes = plt.subplots(ncols=3, figsize=(16, 4))\n",
"\n",
"expt.ic_eta.plot(ax=axes[0])\n",
"expt.ic_vels.u.sel(zl=0, method='nearest').plot(ax=axes[1])\n",
"expt.ic_vels.v.sel(zl=0, method='nearest').plot(ax=axes[2])\n",
"\n",
"axes[0].set_title(\"sea surface height\")\n",
"axes[1].set_title(\"u velocity @ surface\")\n",
"axes[2].set_title(\"v velocity @ surface\");"
"expt.ic_eta.plot()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"the $u$ velocity at the surface:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"expt.ic_vels.u.sel(zl=0, method='nearest').plot()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"and the $v$ velocity at the surface:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"expt.ic_vels.v.sel(zl=0, method='nearest').plot()"
]
},
{
Expand Down

0 comments on commit 2098081

Please sign in to comment.