Skip to content

Commit

Permalink
temp disable p03
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli committed Oct 4, 2023
1 parent 538f30a commit 12f4ee0
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 42 deletions.
89 changes: 60 additions & 29 deletions notebooks/ex-prt-mp7-p03.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 19,
"id": "c06cb986",
"metadata": {},
"outputs": [],
Expand All @@ -67,7 +67,7 @@
"\n",
" buildModel = config.buildModel\n",
" writeModel = config.writeModel\n",
" runModel = config.runModel\n",
" runModel = False # config.runModel\n",
" plotModel = config.plotModel\n",
" plotSave = config.plotSave\n",
" figure_ext = config.figure_ext\n",
Expand All @@ -78,7 +78,7 @@
" # default settings\n",
" buildModel = True\n",
" writeModel = True\n",
" runModel = True\n",
" runModel = False\n",
" plotModel = True\n",
" plotSave = False\n",
" figure_ext = \".png\"\n",
Expand Down Expand Up @@ -107,7 +107,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 20,
"id": "60e86b5d",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -138,7 +138,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 21,
"id": "a5f4e316",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -166,7 +166,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 22,
"id": "e0637d88",
"metadata": {},
"outputs": [],
Expand All @@ -188,7 +188,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 23,
"id": "c5941395",
"metadata": {},
"outputs": [],
Expand All @@ -213,7 +213,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 24,
"id": "556dbf42",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -252,7 +252,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 25,
"id": "b1dbe881",
"metadata": {
"lines_to_end_of_cell_marker": 0,
Expand Down Expand Up @@ -297,7 +297,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 26,
"id": "808bb3c9",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -482,7 +482,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 27,
"id": "838b3f01",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -524,7 +524,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 28,
"id": "cbd9d24d",
"metadata": {},
"outputs": [],
Expand All @@ -546,7 +546,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 29,
"id": "3b13de49",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -575,7 +575,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 30,
"id": "96b51c19",
"metadata": {},
"outputs": [],
Expand All @@ -600,7 +600,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 31,
"id": "2ae255c9",
"metadata": {
"lines_to_end_of_cell_marker": 0,
Expand Down Expand Up @@ -633,6 +633,7 @@
"\n",
" # return a dict keyed on capture zone\n",
" return {\n",
" \"all\": to_mp7_pathlines(pls),\n",
" \"well\": to_mp7_pathlines(pls[(pls[\"izone_term\"] == 2) | (pls[\"izone_term\"] == 3)]),\n",
" \"drain\": to_mp7_pathlines(pls[pls[\"izone_term\"] == 4]),\n",
" \"river\": to_mp7_pathlines(pls[pls[\"izone_term\"] == 5]),\n",
Expand All @@ -657,14 +658,19 @@
" id = row[\"particleid\"]\n",
" ep = eps[eps[\"particleid\"] == id].iloc[0]\n",
" return ep[\"izone\"]\n",
" pls[\"izone_term\"] = pls.apply(lambda r: set_term_zone(r), axis=1)\n",
" \n",
" zone_col = \"izone_term\"\n",
" eps[zone_col] = eps.apply(lambda r: set_term_zone(r), axis=1)\n",
" well = eps[(eps[zone_col] == 2) | (eps[zone_col] == 3)]\n",
" drain = eps[eps[zone_col] == 4]\n",
" river = eps[eps[zone_col] == 5]\n",
"\n",
" # return a dict keyed on capture zone\n",
" return {\n",
" \"all\": to_mp7_endpoints(pls),\n",
" \"well\": to_mp7_endpoints(pls[(pls[\"izone_term\"] == 2) | (pls[\"izone_term\"] == 3)]),\n",
" \"drain\": to_mp7_endpoints(pls[pls[\"izone_term\"] == 4]),\n",
" \"river\": to_mp7_endpoints(pls[pls[\"izone_term\"] == 5]),\n",
" # \"well\": to_mp7_endpoints(well),\n",
" # \"drain\": to_mp7_endpoints(drain),\n",
" # \"river\": to_mp7_endpoints(river),\n",
" }"
]
},
Expand All @@ -678,7 +684,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 32,
"id": "9eb7065b",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -715,7 +721,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 33,
"id": "e1e23048",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -745,6 +751,8 @@
" mv.plot_bc(\"RIV\", alpha=0.2)\n",
" mv.plot_bc(\"WEL\", alpha=0.2, plotAll=True)\n",
"\n",
" if ep[\"all\"] is not None:\n",
" mv.plot_endpoint(ep[\"all\"], label=\"end points\")\n",
" if ep[\"well\"] is not None:\n",
" mv.plot_endpoint(ep[\"well\"], label=\"end points\", color=\"red\")\n",
" if ep[\"drain\"] is not None:\n",
Expand All @@ -757,6 +765,8 @@
" mvins1 = flopy.plot.PlotMapView(model=gwf, ax=axins1)\n",
" mvins1.plot_grid(lw=0.5)\n",
"\n",
" if ep[\"all\"] is not None:\n",
" mv.plot_endpoint(ep[\"all\"], label=\"end points\")\n",
" if ep[\"well\"] is not None:\n",
" mvins1.plot_endpoint(ep[\"well\"], label=\"end points\", color=\"red\")\n",
" if ep[\"drain\"] is not None:\n",
Expand All @@ -773,6 +783,8 @@
" mvins2 = flopy.plot.PlotMapView(model=gwf, ax=axins2)\n",
" mvins2.plot_grid(lw=0.5)\n",
"\n",
" if ep[\"all\"] is not None:\n",
" mv.plot_endpoint(ep[\"all\"], label=\"end points\")\n",
" if ep[\"well\"] is not None:\n",
" mvins2.plot_endpoint(ep[\"well\"], label=\"end points\", color=\"red\")\n",
" if ep[\"drain\"] is not None:\n",
Expand Down Expand Up @@ -956,13 +968,11 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 34,
"id": "ecb95b8e",
"metadata": {},
"outputs": [],
"source": [
"import flopy.utils.binaryfile as bf\n",
"\n",
"def scenario():\n",
" # build models\n",
" mf6sim, mp7sim = build_models()\n",
Expand All @@ -985,12 +995,12 @@
" # export pathline results to VTK files\n",
" vtk = Vtk(model=gwf, binary=True, vertical_exageration=True, smooth=False)\n",
" vtk.add_model(gwf)\n",
" vtk.add_pathline_points(mf6_pl[\"well\"] + mf6_pl[\"river\"])\n",
" vtk.add_pathline_points(mf6_pl[\"all\"])\n",
" mf6_vtk_path = mf6sim.sim_path / f\"{sim_name}_mf6.vtk\"\n",
" vtk.write(mf6_vtk_path)\n",
" vtk = Vtk(model=gwf, binary=True, vertical_exageration=True, smooth=False)\n",
" vtk.add_model(gwf)\n",
" vtk.add_pathline_points([mp7_pl[\"well\"], mp7_pl[\"river\"]])\n",
" vtk.add_pathline_points([mp7_pl[\"all\"]])\n",
" mp7_vtk_path = mf6sim.sim_path / f\"{sim_name}_mp7.vtk\"\n",
" vtk.write(mp7_vtk_path)\n",
"\n",
Expand All @@ -1009,17 +1019,26 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 35,
"id": "a7950b90",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Building MODFLOW 6 model\n",
"Building MODPATH 7 model...\n"
]
}
],
"source": [
"scenario()"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 36,
"id": "4c2ec5a5",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -1051,6 +1070,18 @@
"display_name": "venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 12f4ee0

Please sign in to comment.