Skip to content

Commit

Permalink
Update tests and rename using CamelCase
Browse files Browse the repository at this point in the history
Added several tests, including analytical solutions, renamed the component to RiverFlowDynamics, changes the documentation in main component file, and created a second tutorial
  • Loading branch information
angelmons authored and mcflugen committed Dec 4, 2024
1 parent f50990c commit aefd5c6
Show file tree
Hide file tree
Showing 8 changed files with 859 additions and 251 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"from tqdm import trange\n",
"\n",
"from landlab import RasterModelGrid\n",
"from landlab.components import river_flow_dynamics\n",
"from landlab.components import RiverFlowDynamics\n",
"from landlab.io import esri_ascii"
]
},
Expand All @@ -87,7 +87,7 @@
"metadata": {},
"outputs": [],
"source": [
"help(river_flow_dynamics)"
"help(RiverFlowDynamics)"
]
},
{
Expand Down Expand Up @@ -116,7 +116,7 @@
"channel_slope = 0.01 # Channel slope [m/m]\n",
"\n",
"# Simulation parameters\n",
"n_timesteps = 100 # Number of timesteps\n",
"n_timesteps = 1000 # Number of timesteps\n",
"dt = 0.1 # Timestep duration, [s]\n",
"nrows = 20 # Number of node rows\n",
"ncols = 60 # Number of node cols\n",
Expand Down Expand Up @@ -264,7 +264,7 @@
"outputs": [],
"source": [
"# Finally, we run the model and let the water fill our channel\n",
"rfd = river_flow_dynamics(\n",
"rfd = RiverFlowDynamics(\n",
" grid,\n",
" dt=dt,\n",
" mannings_n=mannings_n,\n",
Expand Down Expand Up @@ -557,7 +557,7 @@
"outputs": [],
"source": [
"# Finally, we run the model and let the water fill our channel\n",
"rfd = river_flow_dynamics(\n",
"rfd = RiverFlowDynamics(\n",
" grid,\n",
" dt=dt,\n",
" mannings_n=mannings_n,\n",
Expand Down Expand Up @@ -618,7 +618,7 @@
"-- --\n",
"### And that's it! \n",
"\n",
"Nice work completing this tutorial. You know now how to use the `river_flow_dynamics` Landlab component to run your own simulations :)\n",
"Nice work completing this tutorial. You know now how to use the `RiverFlowDynamics` Landlab component to run your own simulations :)\n",
"\n",
"-- --\n",
"\n"
Expand Down Expand Up @@ -648,7 +648,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.0"
"version": "3.12.5"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit aefd5c6

Please sign in to comment.