Skip to content

Commit

Permalink
fix ForceDry and MakeFlagregionsCoast notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
rjleveque committed Dec 27, 2023
1 parent 701765b commit 1cc9487
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
22 changes: 15 additions & 7 deletions notebooks/geoclaw/ForceDry.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"from pylab import *\n",
"import os,sys\n",
"from numpy import ma # masked arrays\n",
"import PIL, urllib\n",
"from clawpack.visclaw import colormaps, plottools\n",
"from clawpack.amrclaw import region_tools\n",
"from clawpack.geoclaw import topotools, marching_front"
Expand Down Expand Up @@ -124,8 +125,8 @@
"metadata": {},
"outputs": [],
"source": [
"Whidbey1_png = imread('http:https://www.clawpack.org/gallery/_static/figures/Whidbey1.png')\n",
"\n",
"url = 'http:https://www.clawpack.org/gallery/_static/figures/Whidbey1.png'\n",
"Whidbey1_png = array(PIL.Image.open(urllib.request.urlopen(url)))\n",
"extent = [-122.46, -122.38, 47.93, 47.96]\n",
"\n",
"figure(figsize=(12,6))\n",
Expand Down Expand Up @@ -406,9 +407,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### Internal GeoClaw modifications\n",
"# Internal GeoClaw modifications\n",
"\n",
"The following files in `geoclaw/src/2d/shallow` need to be modified to handle the `force_dry_init` array:\n",
"The following files in `geoclaw/src/2d/shallow` needed to be modified to handle the `force_dry_init` array:\n",
"\n",
"- `setprob.f90` to read in a parameter indicating that there is such an array,\n",
"- `qinit_module.f90` with code to read the array,\n",
Expand All @@ -421,11 +422,18 @@
"- The resolution of the patch agrees with that of the `force_dry_init` array, and it is then assumed that the points in the array are aligned with cell centers on the patch.\n",
"- The simulation time `t` is less than `t_stays_dry`, a time set to be after the relevant level is introduced in the region of interest but before the main tsunami wave has arrived. At later times the tsunami may have gotten a region wet even if `force_dry_init` indicates is should be initially dry."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -439,9 +447,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.10"
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
7 changes: 3 additions & 4 deletions notebooks/geoclaw/MakeFlagregionsCoast.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"outputs": [],
"source": [
"import os,sys\n",
"from imp import reload\n",
"from clawpack.amrclaw import region_tools\n",
"from clawpack.geoclaw import topotools, dtopotools, kmltools, fgmax_tools, marching_front\n",
"from clawpack.visclaw import colormaps\n",
Expand Down Expand Up @@ -334,7 +333,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -348,9 +347,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.10"
"version": "3.10.13"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}

0 comments on commit 1cc9487

Please sign in to comment.