def test_expose(self): ti = 95000.0 tf = self.t_postgl N = sim.expose(self.n, self.z, ti, tf, p=self.p) Nmoretime = sim.expose(self.n, self.z, ti + 500.0, tf - 500.0, p=self.p) Nmoredepth = sim.expose(self.n, self.z + 500.0, ti, tf, p=self.p) self.assertTrue((N < Nmoretime).all()) self.assertTrue((N > Nmoredepth).all())
def test_simple_expose(self): N = sim.expose(self.n, self.z, self.t_postgl, p=self.p) Nmoretime = sim.expose(self.n, self.z, self.t_postgl + 1000.0, p=self.p) Nmoredepth = sim.expose(self.n, self.z + 500.0, self.t_postgl, p=self.p) self.assertTrue((N < Nmoretime).all()) self.assertTrue((N > Nmoredepth).all())
# number of glaciations n = 20 # depth eroded per glaciation (500 cm in g/cm**2) dz = 500 * rho * np.ones(n) # predict concentrations for these depths (to 8 m) z0 = np.linspace(0, 800 * rho) be10 = nuclide.Be10Qtz() # most recent exposure time tH = 17000 # holocene exposure only Nhol = sim.expose(z=z0, ti=tH, tf=0.0, n=be10) # vary glaciation length (t_gl), keeping glacial cycle length constant N10 = sim.multiglaciate(dz=dz, t_gl=10000, t_intergl=90000, t_postgl=tH, z=z0, n=be10, n_gl=n) N50 = sim.multiglaciate(dz=dz, t_gl=50000, t_intergl=50000, t_postgl=tH, z=z0, n=be10,
# number of glaciations n = 20 # depth eroded per glaciation (500 cm in g/cm**2) dz = 500 * rho * np.ones(n) # predict concentrations for these depths (to 8 m) z0 = np.linspace(0, 800 * rho) be10 = nuclide.Be10Qtz() # most recent exposure time tH = 17000 # holocene exposure only Nhol = sim.expose(z=z0, ti=tH, tf=0.0, n=be10) # vary glaciation length (t_gl), keeping glacial cycle length constant N10 = sim.multiglaciate(dz=dz, t_gl=10000, t_intergl=90000, t_postgl=tH, z=z0, n=be10, n_gl=n) N50 = sim.multiglaciate(dz=dz, t_gl=50000, t_intergl=50000, t_postgl=tH, z=z0, n=be10, n_gl=n) N90 = sim.multiglaciate(dz=dz, t_gl=90000, t_intergl=10000, t_postgl=tH, z=z0, n=be10, n_gl=n) # sample depths in meters z = z0 / 100.0 / rho ax1 = plt.subplot(121) plt.semilogx(Nhol, z, 'k', lw=2) plt.semilogx(N10, z, N50, z, N90, z, lw=2)