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
0 commit comments