Skip to content

Commit 03b3d9a

Browse files
committed
Removing print screen and updating plot scripts to allow for specific 20% plot functions
1 parent eada298 commit 03b3d9a

File tree

5 files changed

+34
-33
lines changed

5 files changed

+34
-33
lines changed

cascade/roadway_manager.py

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ def bulldoze(
159159
if ((seaside_water_cells > percent_water_cells_touching_road) or (
160160
bayside_water_cells > percent_water_cells_touching_road)) and allow_causeway==False:
161161
roadway_drown = True
162-
print(
163-
f"Roadway width drowned at {time_index - 1} years, "
164-
f"{percent_water_cells_touching_road * 100.0}% of road borders water"
165-
)
162+
# print(
163+
# f"Roadway width drowned at {time_index - 1} years, "
164+
# f"{percent_water_cells_touching_road * 100.0}% of road borders water"
165+
# )
166166
else:
167167
roadway_drown = False
168168

@@ -236,7 +236,7 @@ def rebuild_dunes(
236236
)
237237

238238
rebuild_dune_volume = np.sum(new_dune_domain - yxz_dune_grid)
239-
239+
z = 20
240240
return new_dune_domain, rebuild_dune_volume
241241

242242
def build_interior_dunes(
@@ -430,10 +430,10 @@ def get_road_relocation_elevation(
430430
# or relocated
431431
if road_ele <= 0:
432432
roadway_drown = 1
433-
print(
434-
f"Roadway cannot be relocated at {time_index - 1} years b/c the road "
435-
"would be at or below MSL"
436-
)
433+
# print(
434+
# f"Roadway cannot be relocated at {time_index - 1} years b/c the road "
435+
# "would be at or below MSL"
436+
# )
437437

438438
return road_ele, roadway_drown
439439

@@ -486,7 +486,7 @@ def road_relocation_checks(
486486

487487
if road_setback < 0:
488488
road_relocated = 1
489-
print('Roadway relocated')
489+
#print('Roadway relocated')
490490

491491
# relocate the road only if the width of the island allows it
492492
if (
@@ -498,10 +498,10 @@ def road_relocation_checks(
498498
):
499499
relocation_break = 1
500500
# time_index - 1 because B3D advances time step at end of dune_update
501-
print(
502-
"Island is too narrow for roadway to be relocated. Roadway "
503-
f"eaten up by dunes at {time_index - 1} years"
504-
)
501+
# print(
502+
# "Island is too narrow for roadway to be relocated. Roadway "
503+
# f"eaten up by dunes at {time_index - 1} years"
504+
# )
505505
else:
506506
road_setback = road_relocation_setback
507507

@@ -524,6 +524,7 @@ def check_sandbag_need(
524524
for cell in range(0, len(barrier3d.DuneDomain[time_index, :, width])):
525525
if barrier3d.DuneDomain[time_index, cell, width] < threshold_elevation:
526526
barrier3d._DuneRestart[width][cell] = design_elevation / 10
527+
c = 10
527528

528529
if exceeds_min_dune_threshold == True:
529530
sandbag_need = True
@@ -771,10 +772,10 @@ def update(self, barrier3d, trigger_dune_knockdown):
771772
# road cannot be below 0 m MHW (sea level); stop managing!
772773
if self._road_ele < 0:
773774
self._drown_break = 1
774-
print(
775-
f"Roadway drowned in place at {self._time_index - 1} years due to "
776-
"SLR - road cannot be below 0 m MHW"
777-
)
775+
# print(
776+
# f"Roadway drowned in place at {self._time_index - 1} years due to "
777+
# "SLR - road cannot be below 0 m MHW"
778+
# )
778779

779780
# an adaptation solution may be to knock down the dunes so that they
780781
# are small and can easily be overwashed

data/Ocracoke_init_data/Ocracoke-CASCADE-parameters.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ GrowthParamStart: false
2020
HdDiffu: 0.75
2121
Ki: 7.5e-06
2222
Kr: 7.5e-05
23-
LShoreface: 523.9734307609483
23+
LShoreface: 524.5623739370453
2424
MHW: 0.46
2525
MaxShrubHeight: 5.3
2626
MaxUpSlope: 0.25
@@ -31,29 +31,29 @@ Qs_min: 1.0
3131
Qshrub_max: 0.15
3232
RSLR_Constant: true
3333
RSLR_const: 0.0056
34-
Rat: 0
34+
Rat: 20
3535
Rin_i: 0.1
3636
Rin_r: 2.0
3737
SalineLimit: 5
3838
Sandbag_elevation: 1.9
3939
SeededRNG: true
4040
Seedmax: 1000.0
4141
Seedmin: 100.0
42-
ShorefaceToe: 1560.3448275999995
42+
ShorefaceToe: 1919.9999999999995
4343
ShrubEl_max: 2.3
4444
ShrubEl_min: 1.2
4545
Shrub_ON: 0
4646
SprayDist: 170
4747
StormSeries: []
4848
StormStart: 2
49-
TMAX: 126
49+
TMAX: 100
5050
TideAmp: 1.2
5151
TimeFruit: 5.0
5252
UprootLimit: -0.2
5353
beta: 0.04
5454
disp_mu: -0.721891
5555
disp_sigma: 1.5
56-
dune_file: C:\Users\frank\PycharmProjects\CASCADE\data\Ocracoke_init_data\dunes\Sample_1_dune.npy
56+
dune_file: C:\Users\frank\PycharmProjects\CASCADE\data\Ocracoke_init_data\dunes\Dunes_2019\Domain_49_dune_2019.npy
5757
elevation_file: C:\Users\frank\PycharmProjects\CASCADE\data\Ocracoke_init_data\elevations\Topography_2019\Domain_49_topography_2019.npy
5858
enable_sandbags: false
5959
growth_param_file: growthparam_1000dam.npy
@@ -65,4 +65,4 @@ rmin: 0.55
6565
s_sf_eq: 0.01698590034494604
6666
sandbag_elevation: 1.8
6767
sandbag_need: false
68-
storm_file: C:\Users\frank\PycharmProjects\CASCADE\data\Ocracoke_init_data\storms\Synthetic_Storms\OCR_Future_StormList_99_baseline.npy
68+
storm_file: C:\Users\frank\PycharmProjects\CASCADE\data\Ocracoke_init_data\storms\Synthetic_Storms\OCR_Future_StormList_1_baseline.npy

scripts/ocracoke_ms/Future_Runs_Test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Save_Path = 'C:\\Users\\frank\\OneDrive - University of North Carolina at Chapel Hill\\Chapter 3\\Model Runs\\Summary_Values\\'
1616

1717
#Management_Name = ['Status_Quo','Natural', 'Nourishment']
18-
Management_Name = ['Preemptive_Relocation']
18+
Management_Name = ['Status_Quo']
1919
#RSLR_Rate = ['IL','I','IH']
2020
RSLR_Rate = ['I']
2121
Sink_Name = ['Erosional_Sink','Accretional_Sink']

scripts/ocracoke_ms/Test_Bay_Interior_Location.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
os.chdir('E:\\Model_Runs')
1111

12-
run_name ='OCR_IL_Status_Quo_S2_Erosional_Sink'
12+
run_name ='OCR_IL_Nourishment_S2_Erosional_Sink'
1313

1414
output = np.load(run_name + ".npz", allow_pickle=True)
1515
cascade = output["cascade"]

scripts/ocracoke_ms/run_forward_batch_forward_simulations.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
os.chdir('C:\\Users\\frank\\PycharmProjects\\CASCADE')
1212

1313
# Set the number of years to simulate
14-
run_years = 126
14+
run_years = 100
1515

1616
# Set the start year
1717
start_year = 2024
@@ -22,8 +22,8 @@
2222
Total_B3D_Number = 69
2323

2424
# Set scenario type
25-
preemptive_relocation = True
26-
status_quo = False
25+
preemptive_relocation = False
26+
status_quo = True
2727
nourishment = False
2828

2929
if preemptive_relocation == True:
@@ -59,7 +59,7 @@
5959
Storms = 'Baseline'
6060

6161
# RSLR Data
62-
RSLR_Type = 'I'
62+
RSLR_Type = 'IH'
6363

6464
if RSLR_Type == 'IL':
6565
RSLR_Data = np.load('C:\\Users\\frank\\PycharmProjects\\CASCADE\\data\\Ocracoke_init_data\\RSLR\\Int_Low_SLR.npy')
@@ -85,7 +85,7 @@
8585
run_name = []
8686
for snames in range(start_num,end_num):
8787
if Storms == 'Baseline':
88-
name_base = 'OCR_'+str(RSLR_Type)+str(Management_name)+'S'+str(snames)
88+
name_base = 'OCR_'+str(RSLR_Type)+str(Management_name)+'S'+str(snames)+'_T'
8989
else:
9090
name_base = 'OCR_'+str(RSLR_Type)+str(Management_name)+'S'+str(snames)+'_10'
9191
Temp_Name = []
@@ -371,7 +371,7 @@ def alongshore_uniform(run_name,
371371
background_erosion = background_erosion_list #list(background_erosion_list) # m/yr, background shoreline erosion
372372
rebuild_dune_threshold = 1 # m
373373
sandbag_management_on = sandbag_cells
374-
sandbag_elevation = 4 # m
374+
sandbag_elevation = 2 # m
375375

376376
# baseline models for comparison -- all roadways ----------------------------------------
377377
roads_on = road_cells
@@ -422,7 +422,7 @@ def alongshore_uniform(run_name,
422422
allow_causeway = allow_causeway
423423
)
424424

425-
for k in range(68,len(run_name)):
425+
for k in range(0,len(run_name)):
426426
for l in range(0,len(background_threshold_list)):
427427
alongshore_uniform(run_name=run_name[k][l],
428428
s_file=s_file[k],

0 commit comments

Comments
 (0)