Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply updated formatting #144

Merged
merged 4 commits into from
Aug 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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",
Original file line number Diff line number Diff line change
@@ -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",
Original file line number Diff line number Diff line change
@@ -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",
@@ -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",
Original file line number Diff line number Diff line change
@@ -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",
@@ -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",
Original file line number Diff line number Diff line change
@@ -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",
Original file line number Diff line number Diff line change
@@ -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",
Original file line number Diff line number Diff line change
@@ -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",
Original file line number Diff line number Diff line change
@@ -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",
Original file line number Diff line number Diff line change
@@ -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",
Original file line number Diff line number Diff line change
@@ -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",
2 changes: 2 additions & 0 deletions lessons/landlab/landlab/bedrock_landslides_on_dems.ipynb
Original file line number Diff line number Diff line change
@@ -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",
1 change: 1 addition & 0 deletions lessons/landlab/landlab/create_a_component.a.ipynb
Original file line number Diff line number Diff line change
@@ -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",
1 change: 1 addition & 0 deletions lessons/landlab/landlab/create_a_component.ipynb
Original file line number Diff line number Diff line change
@@ -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",
8 changes: 8 additions & 0 deletions lessons/python/rainfall_runoff.ipynb
Original file line number Diff line number Diff line change
@@ -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",
@@ -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",
@@ -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",
@@ -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",
312 changes: 72 additions & 240 deletions lessons/python/yet_another_oop.ipynb

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -7,11 +7,7 @@ addopts =
--strict-markers
--doctest-modules
-vvv
--ignore-glob=*/Landlab_grids.ipynb
--ignore-glob=*/practice-your-skills.ipynb
--ignore-glob=*/PracticeYourSkills-landlab.ipynb
--ignore-glob=*/PracticeYourSkills-Solution\ (DO\ not\ Remove).ipynb
--ignore-glob=*/PracticeYourSkills-Solution2\ (do\ NOT\ remove).ipynb
--ignore-glob=*/Welcome_to_TerrainBento.ipynb
--ignore-glob=*/bedrockLandslides_on_DEMs.ipynb
--ignore-glob=*/ku-eml-paleomip.ipynb
@@ -21,3 +17,4 @@ addopts =
--ignore-glob=*/landlab-fault-scarp-for-espin.ipynb
--ignore-glob=*/intro-to-grids.ipynb
--ignore-glob=*/pymt/*.ipynb
--ignore-glob=*/python/yet_another_oop.ipynb