Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
angelmons committed Nov 11, 2024

Verified

This commit was signed with the committer’s verified signature.
darccio Dario Castañé
1 parent 699e134 commit dfea69c
Showing 8 changed files with 859 additions and 251 deletions.
Original file line number Diff line number Diff line change
@@ -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"
]
},
@@ -87,7 +87,7 @@
"metadata": {},
"outputs": [],
"source": [
"help(river_flow_dynamics)"
"help(RiverFlowDynamics)"
]
},
{
@@ -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",
@@ -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",
@@ -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",
@@ -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"
@@ -648,7 +648,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.0"
"version": "3.12.5"
}
},
"nbformat": 4,
Loading

0 comments on commit dfea69c

Please sign in to comment.