def test_simulate_cell_day(self): """ Test the simulate_cell_day function. """ result1 = simulate_cell_day(42, 93, 'a:barren_land:', 1) result2 = simulate_cell_day(42, 93, 'a:barren_land:', 2) self.assertEqual(result1['runoff-vol'] * 2, result2['runoff-vol'])
def test_simulate_day(self): """ Daily simulation. """ result1 = simulate_cell_day(42, 93, 'a:barren_land:', 1) result2 = simulate_cell_day(42, 93, 'a:barren_land:', 2) self.assertEqual(result1['runoff-vol'] * 2, result2['runoff-vol'])
def test_simulate_day_3(self): """ Daily simulation. """ result1 = simulate_cell_day((42, 93), "a:rock", 1) result2 = simulate_cell_day((42, 93), "a:rock", 2) self.assertEqual(result1["runoff-vol"] * 2, result2["runoff-vol"])
def fn(cell, cell_count): return simulate_cell_day(7, 0.107, cell, cell_count)
def fn(cell, cell_count): return simulate_cell_day(5, 0.207, cell, cell_count)
def simulate(precip, tile_string): land_use = tile_string.split(':')[1] ki = lookup_ki(land_use) return simulate_cell_day(precip, 0.207 * ki, tile_string, 1)
def fn(cell, cell_count): (soil_type, land_use) = cell.lower().split(':') et = et_max * lookup_ki(land_use) return simulate_cell_day((precip, et), cell, cell_count)
def simulate_day(cell, cell_count): soil_type, land_use = cell.lower().split(':') et = et_max * lookup_ki(land_use) return simulate_cell_day((precip, et), cell, cell_count)
def simulate(precip, tile_string): soil_type, land_use = tile_string.split(":") ki = lookup_ki(land_use) return simulate_cell_day((precip, 0.207 * ki), tile_string, 1)