Skip to content

Commit a073624

Browse files
author
Lexi Van Blunk
committed
added lines for the dune_gap limit
1 parent 96afa88 commit a073624

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

scripts/outwash_ms/journal_results.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@
6262
config = 4 # 1, 2, 3, or 4
6363

6464
# Display stats on console/show plots
65-
drowning_stats = True
66-
migration_stats = True
65+
drowning_stats = False
66+
migration_stats = False
6767
plotters = False
68-
geomoetry_stats = True
68+
geomoetry_stats = False
6969
dune_stats = True
70-
flux_stats = True
70+
flux_stats = False
7171

7272
# location of the npz files
7373
datadir_b3d = "C:/Users/Lexi/PycharmProjects/CASCADE/data/outwash_data/storms/slope0pt03/rerun_output/{0}/overwash_only/".format(rname)
@@ -177,6 +177,8 @@
177177
initial_gap_height = np.min(sub_domain[0]) # get the lowest value of the dunes at year 0 without the berm elev
178178
berm_el = b3d_obj.barrier3d[0].BermEl
179179
dune_crest_elev = dune_crest + berm_el # dam
180+
# here, a dune gap is defined as any cell less than or equal to the initial gap height + berm elevation
181+
dune_gap_limit = initial_gap_height+berm_el # the minimum elevation of a dune cell
180182
# if a barrier drowns, all dune cells are at the berm elevation, so here, if all the dune crest cells for a
181183
# single year are at the berm elevation, we change the elevation to -0.3 (water) for plotting purposes
182184
for row in range(np.shape(dune_crest_elev)[0]):
@@ -185,10 +187,9 @@
185187

186188
n_dune_gap_cells_array = np.zeros([np.shape(dune_crest_elev)[0],1])
187189
# count the number of dune gap cells in each row (each row = a model year)
188-
# here, a dune gap is defined as any cell less than or equal to the initial gap height + berm elevation
189190
for year in range(np.shape(dune_crest_elev)[0]):
190191
dune_gap_row = dune_crest_elev[year]
191-
n_dune_gap_cells = len(dune_gap_row[dune_gap_row<=initial_gap_height+berm_el])
192+
n_dune_gap_cells = len(dune_gap_row[dune_gap_row <= dune_gap_limit])
192193
n_dune_gap_cells_array[year] = n_dune_gap_cells # save the number of dune gap cells per model year
193194
avg_dune_cells = np.average(n_dune_gap_cells_array) # average the number dune gaps over all model years (for a single storm series)
194195
avg_dune_cells_array_b3d[storm_num-1] = avg_dune_cells * 10 # each cell is 1 dam, so the total number of cells
@@ -249,6 +250,8 @@
249250
initial_gap_height = np.min(sub_domain[0]) # get the lowest value of the dunes at year 0 without the berm elev
250251
berm_el = outwash100_obj.barrier3d[0].BermEl
251252
dune_crest_elev = dune_crest + berm_el # dam
253+
# here, a dune gap is defined as any cell less than or equal to the initial gap height + berm elevation
254+
dune_gap_limit = initial_gap_height+berm_el # the minimum elevation of a dune cell
252255
# if a barrier drowns, all dune cells are at the berm elevation, so here, if all the dune crest cells for a
253256
# single year are at the berm elevation, we change the elevation to -0.3 (water) for plotting purposes
254257
for row in range(np.shape(dune_crest_elev)[0]):
@@ -260,7 +263,7 @@
260263
# here, a dune gap is defined as any cell less than or equal to the initial gap height + berm elevation
261264
for year in range(np.shape(dune_crest_elev)[0]):
262265
dune_gap_row = dune_crest_elev[year]
263-
n_dune_gap_cells = len(dune_gap_row[dune_gap_row<=initial_gap_height+berm_el])
266+
n_dune_gap_cells = len(dune_gap_row[dune_gap_row <= dune_gap_limit])
264267
n_dune_gap_cells_array[year] = n_dune_gap_cells # save the number of dune gap cells per model year
265268
avg_dune_cells = np.average(n_dune_gap_cells_array) # average the number dune gaps over all model years (for a single storm series)
266269
avg_dune_cells_array_100[storm_num-1] = avg_dune_cells * 10 # each cell is 1 dam, so the total number of cells
@@ -323,6 +326,8 @@
323326
initial_gap_height = np.min(sub_domain[0]) # get the lowest value of the dunes at year 0 without the berm elev
324327
berm_el = outwash50_obj.barrier3d[0].BermEl
325328
dune_crest_elev = dune_crest + berm_el # dam
329+
# here, a dune gap is defined as any cell less than or equal to the initial gap height + berm elevation
330+
dune_gap_limit = initial_gap_height+berm_el # the minimum elevation of a dune cell
326331
# if a barrier drowns, all dune cells are at the berm elevation, so here, if all the dune crest cells for a
327332
# single year are at the berm elevation, we change the elevation to -0.3 (water) for plotting purposes
328333
for row in range(np.shape(dune_crest_elev)[0]):
@@ -334,7 +339,7 @@
334339
# here, a dune gap is defined as any cell less than or equal to the initial gap height + berm elevation
335340
for year in range(np.shape(dune_crest_elev)[0]):
336341
dune_gap_row = dune_crest_elev[year]
337-
n_dune_gap_cells = len(dune_gap_row[dune_gap_row<=initial_gap_height+berm_el])
342+
n_dune_gap_cells = len(dune_gap_row[dune_gap_row <= dune_gap_limit])
338343
n_dune_gap_cells_array[year] = n_dune_gap_cells # save the number of dune gap cells per model year
339344
avg_dune_cells = np.average(n_dune_gap_cells_array) # average the number dune gaps over all model years (for a single storm series)
340345
avg_dune_cells_array_50[storm_num-1] = avg_dune_cells * 10 # each cell is 1 dam, so the total number of cells
@@ -399,6 +404,8 @@
399404
initial_gap_height = np.min(sub_domain[0]) # get the lowest value of the dunes at year 0 without the berm elev
400405
berm_el = outwash0_obj.barrier3d[0].BermEl
401406
dune_crest_elev = dune_crest + berm_el # dam
407+
# here, a dune gap is defined as any cell less than or equal to the initial gap height + berm elevation
408+
dune_gap_limit = initial_gap_height+berm_el # the minimum elevation of a dune cell
402409
# if a barrier drowns, all dune cells are at the berm elevation, so here, if all the dune crest cells for a
403410
# single year are at the berm elevation, we change the elevation to -0.3 (water) for plotting purposes
404411
for row in range(np.shape(dune_crest_elev)[0]):
@@ -410,7 +417,7 @@
410417
# here, a dune gap is defined as any cell less than or equal to the initial gap height + berm elevation
411418
for year in range(np.shape(dune_crest_elev)[0]):
412419
dune_gap_row = dune_crest_elev[year]
413-
n_dune_gap_cells = len(dune_gap_row[dune_gap_row<=initial_gap_height+berm_el])
420+
n_dune_gap_cells = len(dune_gap_row[dune_gap_row <= dune_gap_limit])
414421
n_dune_gap_cells_array[year] = n_dune_gap_cells # save the number of dune gap cells per model year
415422
avg_dune_cells = np.average(n_dune_gap_cells_array) # average the number dune gaps over all model years (for a single storm series)
416423
avg_dune_cells_array_0[storm_num-1] = avg_dune_cells * 10 # each cell is 1 dam, so the total number of cells

0 commit comments

Comments
 (0)