-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/gregtucker/grain_hills
- Loading branch information
Showing
11 changed files
with
251 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# GrainHill input file: | ||
# | ||
# block_hill_with_dike: "block hill" model that includes a cell state to | ||
# represent boulders. Here boulders form a vertical dike in the center of the | ||
# domain. Similar to Figure 18d in Tucker et al. (2018). | ||
# | ||
model_type: 'blockhill' | ||
number_of_node_rows: 61 | ||
number_of_node_columns: 101 | ||
cell_width: 0.1 | ||
grav_accel: 9.8 | ||
friction_coef: 1.0 | ||
run_duration: 10000.0 | ||
uplift_interval: 200.0 | ||
disturbance_rate: 0.01 | ||
weathering_rate: 0.0005 | ||
rock_state_for_uplift: 7 | ||
block_layer_dip_angle: 90.0 | ||
block_layer_thickness: 10.0 | ||
layer_left_x: 39.0 | ||
opt_rock_collapse: 1 | ||
save_plots: True | ||
plot_filename: 'block_hill_with_dike' | ||
plot_filetype: '.png' | ||
plot_interval: 1000.0 | ||
output_interval: 1.0e20 | ||
report_interval: 5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# GrainHill input file: | ||
# | ||
# block_hill_with_hogback30deg: "block hill" model that includes a cell state to | ||
# represent boulders. Here boulders form a 30-degree dipping layer that creates | ||
# a hogback. Similar to Figure 18b in Tucker et al. (2018). | ||
# | ||
model_type: 'blockhill' | ||
number_of_node_rows: 61 | ||
number_of_node_columns: 101 | ||
cell_width: 0.1 | ||
grav_accel: 9.8 | ||
friction_coef: 1.0 | ||
run_duration: 15000.0 | ||
uplift_interval: 200.0 | ||
uplift_duration: 10000.0 | ||
disturbance_rate: 0.01 | ||
weathering_rate: 0.0005 | ||
rock_state_for_uplift: 7 | ||
block_layer_dip_angle: 30.0 | ||
block_layer_thickness: 10.0 | ||
y0_top: -50.0 | ||
opt_rock_collapse: 1 | ||
save_plots: True | ||
plot_filename: 'block_hill_with_hogback30deg' | ||
plot_filetype: '.png' | ||
plot_interval: 1500.0 | ||
output_interval: 1.0e20 | ||
report_interval: 5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# GrainHill input file: | ||
# | ||
# block_hill_with_hogback60deg: "block hill" model that includes a cell state to | ||
# represent boulders. Here boulders form a 60-degree dipping layer that creates | ||
# a hogback. Similar to Figure 18c in Tucker et al. (2018). | ||
# | ||
model_type: 'blockhill' | ||
number_of_node_rows: 61 | ||
number_of_node_columns: 101 | ||
cell_width: 0.1 | ||
grav_accel: 9.8 | ||
friction_coef: 1.0 | ||
run_duration: 15000.0 | ||
uplift_interval: 200.0 | ||
uplift_duration: 10000.0 | ||
disturbance_rate: 0.01 | ||
weathering_rate: 0.0005 | ||
rock_state_for_uplift: 7 | ||
block_layer_dip_angle: 60.0 | ||
block_layer_thickness: 10.0 | ||
y0_top: -150.0 | ||
opt_rock_collapse: 1 | ||
save_plots: True | ||
plot_filename: 'block_hill_with_hogback60deg' | ||
plot_filetype: '.png' | ||
plot_interval: 1500.0 | ||
output_interval: 1.0e20 | ||
report_interval: 5.0 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# GrainHill input file: | ||
# | ||
# regolith_hill_dp1: symmetric, all-regolith hillslope with d = 0.01 1/yr, | ||
# tau = 100 yr, and d' = d tau = 1. | ||
# Run is similar to the top center panel of Figure 8 of Tucker et al. (2018), | ||
# but with a shorter hill (~18 m wide instead of ~58 m). | ||
# | ||
model_type: 'grainhill' | ||
number_of_node_rows: 79 | ||
number_of_node_columns: 184 | ||
cell_width: 0.1 | ||
grav_accel: 9.8 | ||
friction_coef: 1.0 | ||
run_duration: 15000.0 | ||
uplift_interval: 100.0 | ||
disturbance_rate: 0.01 | ||
weathering_rate: 0.001 | ||
rock_state_for_uplift: 7 | ||
opt_rock_collapse: 0 | ||
opt_track_grains: False | ||
save_plots: True | ||
plot_filename: 'regolith_hill_dp1' | ||
plot_filetype: '.png' | ||
plot_interval: 3000.0 | ||
output_interval: 1.0e20 | ||
report_interval: 5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# GrainHill input file: | ||
# | ||
# regolith_hill_dp10: symmetric, all-regolith hillslope with d = 0.1 1/yr, | ||
# tau = 100 yr, and d' = d tau = 10. | ||
# Run is similar to the top right panel of Figure 8 of Tucker et al. (2018), | ||
# but with a shorter hill (~18 m wide instead of ~58 m). | ||
# | ||
model_type: 'grainhill' | ||
number_of_node_rows: 79 | ||
number_of_node_columns: 184 | ||
cell_width: 0.1 | ||
grav_accel: 9.8 | ||
friction_coef: 1.0 | ||
run_duration: 15000.0 | ||
uplift_interval: 100.0 | ||
disturbance_rate: 0.1 | ||
weathering_rate: 0.001 | ||
rock_state_for_uplift: 7 | ||
opt_rock_collapse: 0 | ||
opt_track_grains: False | ||
save_plots: True | ||
plot_filename: 'regolith_hill_dp10' | ||
plot_filetype: '.png' | ||
plot_interval: 3000.0 | ||
output_interval: 1.0e20 | ||
report_interval: 5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# GrainHill input file: | ||
# | ||
# rock_hill_dp10wp0p4: symmetric, rock-based hillslope with relatively | ||
# inefficient weathering, and efficient disturbance. | ||
# Run is similar to the bottom middle panel of Figure 11 of | ||
# Tucker et al. (2018), but with a slightly shorter hill (~18 m wide instead | ||
# of ~26 m). | ||
# | ||
model_type: 'grainhill' | ||
number_of_node_rows: 158 | ||
number_of_node_columns: 184 | ||
cell_width: 0.1 | ||
grav_accel: 9.8 | ||
friction_coef: 1.0 | ||
run_duration: 100000.0 | ||
uplift_interval: 1000.0 | ||
disturbance_rate: 0.01 | ||
weathering_rate: 0.0004 | ||
rock_state_for_uplift: 8 | ||
opt_rock_collapse: 0 | ||
opt_track_grains: False | ||
save_plots: True | ||
plot_filename: 'rock_hill_dp10wp0p4' | ||
plot_filetype: '.png' | ||
plot_interval: 10000.0 | ||
output_interval: 1.0e20 | ||
report_interval: 5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# GrainHill input file: | ||
# | ||
# rock_hill_dp10wp40: symmetric, rock-based hillslope with relatively | ||
# efficient weathering and disturbance. | ||
# Run is similar to the top middle panel of Figure 11 of Tucker et al. (2018), | ||
# but with a slightly shorter hill (~18 m wide instead of ~26 m). | ||
# | ||
model_type: 'grainhill' | ||
number_of_node_rows: 158 | ||
number_of_node_columns: 184 | ||
cell_width: 0.1 | ||
grav_accel: 9.8 | ||
friction_coef: 1.0 | ||
run_duration: 100000.0 | ||
uplift_interval: 1000.0 | ||
disturbance_rate: 0.01 | ||
weathering_rate: 0.04 | ||
rock_state_for_uplift: 8 | ||
opt_rock_collapse: 0 | ||
opt_track_grains: False | ||
save_plots: True | ||
plot_filename: 'rock_hill_dp10wp40' | ||
plot_filetype: '.png' | ||
plot_interval: 10000.0 | ||
output_interval: 1.0e20 | ||
report_interval: 5.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/usr/bin/env python2 | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Make a gif animation from a set of .png files. | ||
Assumes the files have the same base name, followed by a number, | ||
followed by .png. Designed to create movies from a sequence of | ||
output images from the GrainHill model. | ||
Created on Tue May 15 14:05:15 2018 | ||
@author: gtucker | ||
""" | ||
|
||
import imageio | ||
import sys | ||
import os | ||
|
||
|
||
def main(basename): | ||
|
||
images = [] | ||
|
||
for this_name in sorted(os.listdir('.')): | ||
print('appending ' + this_name) | ||
if this_name[-3:] == 'png': | ||
images.append(imageio.imread(this_name)) | ||
imageio.mimsave(basename + '_movie.gif', images) | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
try: | ||
basename = sys.argv[1] | ||
except: | ||
print('Usage: ' + sys.argv[0] + ' <folder/file name>') | ||
raise | ||
|
||
main(basename) |