from matplotlib import pyplot as plt plt.ion() import grlp reload(grlp) S0 = 0.015 P_xB = 0.2 z1 = 0 Qamp = 0.5 dt = 3.15E7 * 1E2 nt = int(100) Bmax = 250. lp = grlp.LongProfile() self = lp lp.set_intermittency(1) self.bcr = z1 lp.basic_constants() lp.bedload_lumped_constants() lp.set_hydrologic_constants() lp.set_x(dx=500., nx=180, x0=10E3) lp.set_z(S0=-S0, z1=z1) lp.set_A(k_xA=1.) lp.set_Q(k_xQ=1.433776163432246e-05, P_xQ=7 / 4. * 0.7) lp.set_B(k_xB=Bmax / np.max(lp.x**P_xB), P_xB=P_xB)
import grlp reload(grlp) S0 = 0.015 P_xB = 0.2 z1 = 0 + 7.5 # Interesting -- my RHS always has to be 0 (not quite right) dt = 3.15E22 nseg = 1 segments = [] for i in range(nseg): segments.append(grlp.LongProfile()) # This should be built from network in the future #Qlist = [10., 15., 25., 20., 45.] #upstream_segment_list = [[], [], [0,1], [], [2,3]] #downstream_segment_list = [[2], [2], [4], [4], []] Qlist = [10., 10.] upstream_segment_list = [[], [0]] downstream_segment_list = [[1], []] Qlist = [10.] upstream_segment_list = [[]] downstream_segment_list = [[]] i = 0