Skip to content

Commit

Permalink
Apply updated formatting rules
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpiper committed Aug 9, 2024
1 parent d2336c2 commit 95c8fc1
Show file tree
Hide file tree
Showing 19 changed files with 116 additions and 250 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@
"outputs": [],
"source": [
"# we can use an output writer to run until the model reaches steady state.\n",
"\n",
"\n",
"class run_to_steady:\n",
" def __init__(self, model):\n",
" self.model = model\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@
"outputs": [],
"source": [
"# we can use an output writer to run until the model reaches steady state.\n",
"\n",
"\n",
"class run_to_steady:\n",
" def __init__(self, model):\n",
" self.model = model\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
"outputs": [],
"source": [
"# we can use an output writer to run until the model reaches steady state.\n",
"\n",
"\n",
"class run_to_steady:\n",
" def __init__(self, model):\n",
" self.model = model\n",
Expand Down Expand Up @@ -130,6 +132,7 @@
"# initialize the model by passing the correct arguments and\n",
"# keyword arguments.\n",
"\n",
"\n",
"model = BasicRt(\n",
" clock,\n",
" grid,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@
"outputs": [],
"source": [
"# we can use an output writer to run until the model reaches steady state.\n",
"\n",
"\n",
"class run_to_steady:\n",
" def __init__(self, model):\n",
" self.model = model\n",
Expand Down Expand Up @@ -129,6 +131,7 @@
"# initialize the model by passing the correct arguments and\n",
"# keyword arguments.\n",
"\n",
"\n",
"model = BasicRt(\n",
" clock,\n",
" grid,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@
"outputs": [],
"source": [
"# we can use an output writer to run until the model reaches steady state.\n",
"\n",
"\n",
"class run_to_steady:\n",
" def __init__(self, model):\n",
" self.model = model\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@
"outputs": [],
"source": [
"# we can use an output writer to run until the model reaches steady state.\n",
"\n",
"\n",
"class run_to_steady:\n",
" def __init__(self, model):\n",
" self.model = model\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
"outputs": [],
"source": [
"# we can use an output writer to run until the model reaches steady state.\n",
"\n",
"\n",
"class run_to_steady:\n",
" def __init__(self, model):\n",
" self.model = model\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@
"outputs": [],
"source": [
"# we can use an output writer to run until the model reaches steady state.\n",
"\n",
"\n",
"class run_to_steady:\n",
" def __init__(self, model):\n",
" self.model = model\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
"outputs": [],
"source": [
"# we can use an output writer to run until the model reaches steady state.\n",
"\n",
"\n",
"class run_to_steady:\n",
" def __init__(self, model):\n",
" self.model = model\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@
"outputs": [],
"source": [
"# we can use an output writer to run until the model reaches steady state.\n",
"\n",
"\n",
"class run_to_steady:\n",
" def __init__(self, model):\n",
" self.model = model\n",
Expand Down
4 changes: 2 additions & 2 deletions lessons/landlab/landlab/05-components.a.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
"outputs": [],
"source": [
"# recall the question mark notation used to access documentation in Landlab\n",
"?LinearDiffuser"
"LinearDiffuser?"
]
},
{
Expand Down Expand Up @@ -384,7 +384,7 @@
"outputs": [],
"source": [
"# check out the optional variables\n",
"?LinearDiffuser"
"LinearDiffuser?"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions lessons/landlab/landlab/05-components.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
"outputs": [],
"source": [
"# recall the question mark notation used to access documentation in Landlab\n",
"?LinearDiffuser"
"LinearDiffuser?"
]
},
{
Expand Down Expand Up @@ -404,7 +404,7 @@
"outputs": [],
"source": [
"# check out the optional variables\n",
"?LinearDiffuser"
"LinearDiffuser?"
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions lessons/landlab/landlab/bedrock_landslides_on_dems.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,8 @@
"outputs": [],
"source": [
"# These are plotting functions\n",
"\n",
"\n",
"def plotting(\n",
" grid, topo=True, DA=True, hill_DA=False, flow_metric=\"D8\", hill_flow_metric=\"Quinn\"\n",
"):\n",
Expand Down
1 change: 1 addition & 0 deletions lessons/landlab/landlab/create_a_component.a.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
"source": [
"# Type your code here: calculate time step\n",
"\n",
"\n",
"for _ in trange(1000):\n",
" ... # Type your code here: calculate diffusion and update *z*\n",
"\n",
Expand Down
1 change: 1 addition & 0 deletions lessons/landlab/landlab/create_a_component.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@
"source": [
"# Type your code here: calculate time step\n",
"\n",
"\n",
"for _ in trange(1000):\n",
" ... # Type your code here: calculate diffusion and update *z*\n",
"\n",
Expand Down
6 changes: 3 additions & 3 deletions lessons/landlab/landlab/intro-to-grids.a.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"outputs": [],
"source": [
"# get info on RasterModelGrid\n",
"?RasterModelGrid"
"RasterModelGrid?"
]
},
{
Expand Down Expand Up @@ -1044,7 +1044,7 @@
"outputs": [],
"source": [
"# recall the question mark notation used to access documentation in Landlab\n",
"?LinearDiffuser"
"LinearDiffuser?"
]
},
{
Expand Down Expand Up @@ -1253,7 +1253,7 @@
"outputs": [],
"source": [
"# check out the optional variables\n",
"?LinearDiffuser"
"LinearDiffuser?"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions lessons/landlab/landlab/intro-to-grids.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"outputs": [],
"source": [
"# get info on RasterModelGrid\n",
"?RasterModelGrid"
"RasterModelGrid?"
]
},
{
Expand Down Expand Up @@ -1100,7 +1100,7 @@
"outputs": [],
"source": [
"# recall the question mark notation used to access documentation in Landlab\n",
"?LinearDiffuser"
"LinearDiffuser?"
]
},
{
Expand Down Expand Up @@ -1325,7 +1325,7 @@
"outputs": [],
"source": [
"# check out the optional variables\n",
"?LinearDiffuser"
"LinearDiffuser?"
]
},
{
Expand Down
8 changes: 8 additions & 0 deletions lessons/python/rainfall_runoff.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@
"outputs": [],
"source": [
"# calculate time to peak\n",
"\n",
"\n",
"def calculate_time_to_peak(length, slope, t_rain):\n",
" \"\"\"\n",
" Calculate the time to peak of a hydrograph using the SCS-CN method.\n",
Expand Down Expand Up @@ -165,6 +167,8 @@
"outputs": [],
"source": [
"# calculate peak discharge\n",
"\n",
"\n",
"def calculate_peak_discharge(area, w_eff, t_peak):\n",
" \"\"\"\n",
" Calculate the peak discharge of a hydrograph using the SCS-CN method.\n",
Expand Down Expand Up @@ -245,6 +249,8 @@
"outputs": [],
"source": [
"# calculate the runoff hydrograph\n",
"\n",
"\n",
"def calculate_runoff_hydrograph(q_peak, t_peak, unit_hydrograph):\n",
" \"\"\"\n",
" Calculate the runoff hydrograph using the SCS-CN method.\n",
Expand Down Expand Up @@ -289,6 +295,8 @@
"outputs": [],
"source": [
"# create a model function\n",
"\n",
"\n",
"def scs_curve_number_model(cn, area, length, slope, t_rain, w, unit_hydrograph):\n",
" \"\"\"\n",
" Model the runoff hydrograph using the SCS-CN method.\n",
Expand Down
Loading

0 comments on commit 95c8fc1

Please sign in to comment.