Skip to content

Commit

Permalink
Remove nc_time_axis and fix hide-input for cells
Browse files Browse the repository at this point in the history
  • Loading branch information
dabail10 committed Feb 4, 2025
1 parent ca3af95 commit 5345b7b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 8 deletions.
2 changes: 1 addition & 1 deletion nblibrary/ice/Hemis_seaice_visual_compare_contour.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
},
"outputs": [],
"source": [
"cupid_run = 0\n",
"cupid_run = 1\n",
"\n",
"if cupid_run == 1:\n",
"\n",
Expand Down
23 changes: 19 additions & 4 deletions nblibrary/ice/Hemis_seaice_visual_compare_obs_lens.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
"import yaml\n",
"import pandas as pd\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib.lines as mlines\n",
"import nc_time_axis"
"import matplotlib.lines as mlines"
]
},
{
Expand Down Expand Up @@ -191,7 +190,15 @@
"cell_type": "code",
"execution_count": null,
"id": "31c8d5bf-b76f-46b2-bb5b-a654fa2150ed",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"### Read in the CESM LENS historical data\n",
Expand Down Expand Up @@ -259,7 +266,15 @@
"cell_type": "code",
"execution_count": null,
"id": "4f8d57eb-8411-4b70-a200-35b99d3152f2",
"metadata": {},
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": [
"hide-input"
]
},
"outputs": [],
"source": [
"# Two functions to help draw plots even if only one year of data is available\n",
Expand Down
5 changes: 2 additions & 3 deletions nblibrary/ice/plot_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ def plot_diff(field1, field2, levels, case1, case2, title, proj, TLAT, TLON):

ds_pop = add_cyclic(ds_obs)

ifrac_obs = ds_pop.monthly_ifrac.mean(dim="month")

aice = title.find("Concentration")

if np.size(levels) > 2:
Expand All @@ -101,14 +99,15 @@ def plot_diff(field1, field2, levels, case1, case2, title, proj, TLAT, TLON):
gs = GridSpec(2, 4)

if proj == "N":

ax = fig.add_subplot(gs[0, :2], projection=ccrs.NorthPolarStereo())
# sets the latitude / longitude boundaries of the plot
ax.set_extent([0.005, 360, 90, 45], crs=ccrs.PlateCarree())
ifrac_obs = ds_pop["monthly_ifrac"].isel(month=2)
if proj == "S":
ax = fig.add_subplot(gs[0, :2], projection=ccrs.SouthPolarStereo())
# sets the latitude / longitude boundaries of the plot
ax.set_extent([0.005, 360, -90, -45], crs=ccrs.PlateCarree())
ifrac_obs = ds_pop["monthly_ifrac"].isel(month=8)

ax.set_boundary(circle, transform=ax.transAxes)
ax.add_feature(cfeature.LAND, zorder=100, edgecolor="k")
Expand Down

0 comments on commit 5345b7b

Please sign in to comment.