def test_route_to_multiple_error_raised_run(): mg = RasterModelGrid((10, 10)) z = mg.add_zeros("node", "topographic__elevation") z += mg.x_of_node + mg.y_of_node lmb = LakeMapperBarnes(mg) fa = FlowAccumulator(mg, flow_director="MFD") fa.run_one_step() with pytest.raises(NotImplementedError): lmb.run_one_step()
def test_route_to_multiple_error_raised_run(): mg = RasterModelGrid((10, 10)) z = mg.add_zeros("node", "topographic__elevation") z += mg.x_of_node + mg.y_of_node lmb = LakeMapperBarnes(mg) fa = FlowAccumulator(mg, flow_director="MFD") fa.run_one_step() with pytest.raises(NotImplementedError): lmb.run_one_step()
surface="topographic__elevation", fill_surface="topographic__elevation", redirect_flow_steepest_descent=False, reaccumulate_flow=False, track_lakes=False, ignore_overfill=True, ) dfr = DepressionFinderAndRouter(grid) ld = LinearDiffuser(grid, D) sp = FastscapeEroder(grid, K_sp=Ksp, m_sp=0.5, n_sp=1.0, threshold_sp=E0) for i in range(N): dfr._find_pits() if dfr._number_of_pits > 0: lmb.run_one_step() z[grid.core_nodes] += U * dt ld.run_one_step(dt) fa.run_one_step() sp.run_one_step(dt) print('completed loop %d' % i) if i % output_interval == 0: print('finished iteration %d' % i) filename = base_path + '%d_grid_%d.nc' % (ID, i) to_netcdf(grid, filename, include="at_node:topographic__elevation")