Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

210 nlmod adding rch and evt packages #239

Merged
merged 2 commits into from
Aug 24, 2023
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
26 changes: 13 additions & 13 deletions docs/examples/01_basic_model.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"import flopy\n",
"import geopandas as gpd\n",
"import matplotlib.pyplot as plt\n",
"import nlmod"
"import nlmod\n"
]
},
{
Expand All @@ -35,7 +35,7 @@
"source": [
"print(f\"nlmod version: {nlmod.__version__}\")\n",
"\n",
"nlmod.util.get_color_logger(\"INFO\");"
"nlmod.util.get_color_logger(\"INFO\")"
]
},
{
Expand Down Expand Up @@ -76,7 +76,7 @@
"steady_state = True\n",
"start_time = \"2015-1-1\"\n",
"add_northsea = True\n",
"starting_head = 1.0"
"starting_head = 1.0\n"
]
},
{
Expand All @@ -103,7 +103,7 @@
")\n",
"\n",
"if add_northsea:\n",
" ds = nlmod.read.rws.add_northsea(ds, cachedir=cachedir)"
" ds = nlmod.read.rws.add_northsea(ds, cachedir=cachedir)\n"
]
},
{
Expand Down Expand Up @@ -134,7 +134,7 @@
"ic = nlmod.gwf.ic(ds, gwf, starting_head=starting_head)\n",
"\n",
"# Create the output control package\n",
"oc = nlmod.gwf.oc(ds, gwf)"
"oc = nlmod.gwf.oc(ds, gwf)\n"
]
},
{
Expand All @@ -152,7 +152,7 @@
"ds.update(rws_ds)\n",
"\n",
"# build ghb package\n",
"ghb = nlmod.gwf.ghb(ds, gwf, bhead=f\"{da_name}_stage\", cond=f\"{da_name}_cond\")"
"ghb = nlmod.gwf.ghb(ds, gwf, bhead=f\"{da_name}_stage\", cond=f\"{da_name}_cond\")\n"
]
},
{
Expand All @@ -167,7 +167,7 @@
"ds.update(ahn_ds)\n",
"\n",
"# build surface level drain package\n",
"drn = nlmod.gwf.surface_drain_from_ds(ds, gwf, resistance=10.0)"
"drn = nlmod.gwf.surface_drain_from_ds(ds, gwf, resistance=10.0)\n"
]
},
{
Expand All @@ -178,7 +178,7 @@
"source": [
"# add constant head cells at model boundaries\n",
"ds.update(nlmod.grid.mask_model_edge(ds, ds[\"idomain\"]))\n",
"chd = nlmod.gwf.chd(ds, gwf, mask=\"edge_mask\", head=\"starting_head\")"
"chd = nlmod.gwf.chd(ds, gwf, mask=\"edge_mask\", head=\"starting_head\")\n"
]
},
{
Expand All @@ -193,7 +193,7 @@
"ds.update(knmi_ds)\n",
"\n",
"# create recharge package\n",
"rch = nlmod.gwf.rch(ds, gwf)"
"rch = nlmod.gwf.rch(ds, gwf)\n"
]
},
{
Expand All @@ -209,7 +209,7 @@
"metadata": {},
"outputs": [],
"source": [
"ds"
"ds\n"
]
},
{
Expand All @@ -228,7 +228,7 @@
"metadata": {},
"outputs": [],
"source": [
"nlmod.sim.write_and_run(sim, ds, write_ds=True, nb_path=\"01_basic_model.ipynb\")"
"nlmod.sim.write_and_run(sim, ds, write_ds=True, script_path=\"01_basic_model.ipynb\")\n"
]
},
{
Expand All @@ -246,7 +246,7 @@
"outputs": [],
"source": [
"ax = nlmod.plot.modelgrid(ds)\n",
"nlmod.plot.surface_water(ds, ax=ax)"
"nlmod.plot.surface_water(ds, ax=ax)\n"
]
},
{
Expand Down Expand Up @@ -279,7 +279,7 @@
"\n",
"for axes1 in axes:\n",
" for ax in axes1:\n",
" ax.axis(\"scaled\")"
" ax.axis(\"scaled\")\n"
]
}
],
Expand Down
14 changes: 7 additions & 7 deletions docs/examples/02_surface_water.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"source": [
"print(f\"nlmod version: {nlmod.__version__}\")\n",
"\n",
"nlmod.util.get_color_logger(\"INFO\");"
"nlmod.util.get_color_logger(\"INFO\")\n"
]
},
{
Expand Down Expand Up @@ -152,7 +152,7 @@
"outputs": [],
"source": [
"f, ax = nlmod.plot.get_map(extent)\n",
"bgt.plot(\"bronhouder\", legend=True, ax=ax);"
"bgt.plot(\"bronhouder\", legend=True, ax=ax)\n"
]
},
{
Expand Down Expand Up @@ -453,7 +453,7 @@
"xmin, xmax, ymin, ymax = extent\n",
"offset = 100\n",
"ax.set_xlim(xmin - offset, xmax + offset)\n",
"ax.set_ylim(ymin - offset, ymax + offset);"
"ax.set_ylim(ymin - offset, ymax + offset)\n"
]
},
{
Expand Down Expand Up @@ -501,7 +501,7 @@
"gwf.modelgrid.plot(ax=ax)\n",
"ax.set_xlim(xlim[0], xlim[0] + ds.delr * 1.1)\n",
"ax.set_ylim(ylim)\n",
"ax.set_title(f\"Surface water shapes in cell: {cid}\");"
"ax.set_title(f\"Surface water shapes in cell: {cid}\")\n"
]
},
{
Expand Down Expand Up @@ -713,7 +713,7 @@
"metadata": {},
"outputs": [],
"source": [
"nlmod.sim.write_and_run(sim, ds, write_ds=True, nb_path=\"02_surface_water.ipynb\")"
"nlmod.sim.write_and_run(sim, ds, write_ds=True, script_path=\"02_surface_water.ipynb\")"
]
},
{
Expand Down Expand Up @@ -757,7 +757,7 @@
"qm = mv.plot_array(head[-1], cmap=\"RdBu\") # last timestep\n",
"mv.plot_ibound() # plot inactive cells in red\n",
"fig.colorbar(qm, shrink=1.0)\n",
"ax.set_title(f\"Heads top-view, layer {ilay}\");"
"ax.set_title(f\"Heads top-view, layer {ilay}\")\n"
]
},
{
Expand All @@ -783,7 +783,7 @@
"xs.plot_ibound() # plot inactive cells in red\n",
"fig.colorbar(qm, shrink=1.0)\n",
"col = gwf.modelgrid.ncol // 2\n",
"ax.set_title(f\"Cross-section along column {col}\");"
"ax.set_title(f\"Cross-section along column {col}\")\n"
]
}
],
Expand Down
4 changes: 2 additions & 2 deletions docs/examples/03_local_grid_refinement.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"source": [
"print(f\"nlmod version: {nlmod.__version__}\")\n",
"\n",
"nlmod.util.get_color_logger(\"INFO\");"
"nlmod.util.get_color_logger(\"INFO\")\n"
]
},
{
Expand Down Expand Up @@ -233,7 +233,7 @@
"outputs": [],
"source": [
"nlmod.sim.write_and_run(\n",
" sim, ds, write_ds=True, nb_path=\"03_local_grid_refinement.ipynb\"\n",
" sim, ds, write_ds=True, script_path=\"03_local_grid_refinement.ipynb\"\n",
")"
]
},
Expand Down
Loading