Skip to content

Commit 7340df5

Browse files
committed
Updated run and data processing scripts
1 parent e6c4293 commit 7340df5

File tree

4 files changed

+120
-7
lines changed

4 files changed

+120
-7
lines changed

data/Ocracoke_init_data/Ocracoke-CASCADE-parameters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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_26_baseline.npy
68+
storm_file: C:\Users\frank\PycharmProjects\CASCADE\data\Ocracoke_init_data\storms\Synthetic_Storms\OCR_Future_StormList_99_baseline.npy
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
import copy
2+
3+
import matplotlib.pyplot as plt
4+
import numpy as np
5+
import os
6+
import copy
7+
8+
import pandas as pd
9+
10+
os.chdir("E:\\Chapter 2\\")
11+
#save_path = 'C:\\Users\\frank\\OneDrive - University of North Carolina at Chapel Hill\\Chapter 2\\Cascade_CSV_Outputs\\Hindcasts\\'
12+
13+
14+
Base_Name_List = ['Geom_1',
15+
'Geom_2',
16+
'Geom_3',
17+
'Geom_4',
18+
'Geom_5']
19+
20+
run_name = 'Geom_5_IH_10_S1.npz' #'Geom_4_IL_10_S49_New_Sink.npz'
21+
#for geos in range(len(Base_Name_List)):
22+
# temp_run_name = copy.deepcopy(Base_Name_List[geos]+'_Calibrated_Hindcast_2.npz')
23+
# run_name.append(copy.deepcopy(temp_run_name))
24+
25+
output = np.load(run_name, allow_pickle=True)
26+
cascade = output["cascade"]
27+
cascade = cascade[0]
28+
29+
bmft = cascade._bmft_coupler
30+
bmftc = bmft._bmftc[0]
31+
O_flux = bmftc.fluxes
32+
Forest_e = bmftc.Forest_edge
33+
Marsh_e = bmftc.Marsh_edge
34+
z = bmftc._organic_dep_autoch# Subtract eroded mass from depositional record
35+
x = bmftc._organic_dep_alloch
36+
z1 = z[0]
37+
38+
xyz = np.sum((z,x),axis=0)
39+
40+
41+
plt.plot(z[51][4500:])
42+
plt.plot(z[71][4500:])
43+
plt.plot(z[91][4500:])
44+
plt.plot(z[111][4500:])
45+
46+
plt.show()
47+
48+
plt.plot(z[51][4500:])
49+
plt.plot(z[52][4500:])
50+
plt.plot(z[53][4500:])
51+
plt.plot(z[54][4500:])
52+
53+
plt.show()
54+
55+
Start_Year = 50
56+
End_Year = 175
57+
58+
Cum_C_Deposits = []
59+
60+
for years in range(Start_Year-1,End_Year):
61+
temp_sum = np.sum(xyz[Start_Year:years],axis=0)
62+
Cum_C_Deposits.append(copy.deepcopy(temp_sum))
63+
64+
plt.plot(Cum_C_Deposits[0][0:])
65+
plt.plot(Cum_C_Deposits[25][0:])
66+
plt.plot(Cum_C_Deposits[50][0:])
67+
plt.plot(Cum_C_Deposits[75][0:])
68+
plt.plot(Cum_C_Deposits[100][0:])
69+
plt.plot(Cum_C_Deposits[124][0:])
70+
71+
plt.show()
72+
73+
elev = bmftc.elevation
74+
75+
plt.plot(elev[50][4500:])
76+
plt.axvline(x=Forest_e[50]-4500,linestyle ='dashed',color='blue')
77+
plt.axvline(x=Marsh_e[50]-4500,linestyle ='dashed', color='blue')
78+
#plt.show()
79+
80+
plt.plot(elev[70][4500:],color = 'orange')
81+
plt.axvline(x=Forest_e[70]-4500,linestyle ='dashed',color='orange')
82+
plt.axvline(x=Marsh_e[70]-4500,linestyle ='dashed', color='orange')
83+
#plt.show()
84+
85+
plt.plot(elev[90][4500:],color = 'red')
86+
plt.axvline(x=Forest_e[90]-4500,linestyle ='dashed',color='red')
87+
plt.axvline(x=Marsh_e[90]-4500,linestyle ='dashed', color='red')
88+
#plt.show()
89+
90+
plt.plot(elev[110][4500:],color = 'green')
91+
plt.axvline(x=Forest_e[110]-4500,linestyle ='dashed',color='green')
92+
plt.axvline(x=Marsh_e[110]-4500,linestyle ='dashed', color='green')
93+
94+
plt.plot(elev[130][4500:],color = 'black')
95+
plt.axvline(x=Forest_e[130]-4500,linestyle ='dashed',color='black')
96+
plt.axvline(x=Marsh_e[130]-4500,linestyle ='dashed', color='black')
97+
#plt.show()
98+
99+
plt.plot(elev[150][4500:],color = 'grey')
100+
plt.axvline(x=Forest_e[150]-4500,linestyle ='dashed',color='grey')
101+
plt.axvline(x=Marsh_e[150]-4500,linestyle ='dashed', color='grey')
102+
plt.show()
103+
104+
105+
plt.plot(elev[51][4500:])
106+
plt.plot(elev[101][4500:])
107+
plt.plot(elev[151][4500:])
108+
plt.show()
109+
110+
b3d = cascade._barrier3d[0]
111+
112+
113+
z = 20

scripts/ocracoke_ms/Future_Runs_Test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
Save_Path = 'C:\\Users\\frank\\OneDrive - University of North Carolina at Chapel Hill\\Chapter 3\\Model Runs\\Summary_Values\\'
1616

17-
#Management_Name = ['Status_Quo','Natural', 'Nourishment']
17+
Management_Name = ['Status_Quo','Natural', 'Nourishment']
1818
Management_Name = ['Natural']
1919
RSLR_Rate = ['IL','I','IH']
20-
RSLR_Rate = ['IH']
20+
#RSLR_Rate = ['IL']
2121
Sink_Name = ['Erosional_Sink','Accretional_Sink']
2222
#Sink_Name = ['Erosional_Sink']
2323

@@ -77,7 +77,7 @@ def Process_Batch(Base_Name,
7777
Island_Width_TS = []
7878

7979

80-
for runs in range(len(name_list)):
80+
for runs in range(40,len(name_list)):
8181
#for runs in range(0,2):
8282
Model_Run_Year,Drowning_Domain_Location, Cascade_List = Process_Data(run_name_batch = name_list, load_index = runs)
8383

scripts/ocracoke_ms/run_forward_batch_forward_simulations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
# Set scenario type
2525
preemptive_relocation = False
2626
status_quo = False
27-
nourishment = True
27+
nourishment = False
2828

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

6161
# RSLR Data
62-
RSLR_Type = 'IL'
62+
RSLR_Type = 'I'
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')
@@ -79,7 +79,7 @@
7979

8080
Sink_Options = ['Accretional_Sink','Erosional_Sink']
8181

82-
start_num = 0
82+
start_num = 1
8383
end_num = 100
8484

8585
run_name = []

0 commit comments

Comments
 (0)