Ejemplo n.º 1
0
 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'])
Ejemplo n.º 2
0
 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'])
Ejemplo n.º 3
0
 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"])
Ejemplo n.º 4
0
 def fn(cell, cell_count):
     return simulate_cell_day(7, 0.107, cell, cell_count)
Ejemplo n.º 5
0
 def fn(cell, cell_count):
     return simulate_cell_day(5, 0.207, cell, cell_count)
Ejemplo n.º 6
0
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)
Ejemplo n.º 7
0
 def fn(cell, cell_count):
     return simulate_cell_day(7, 0.107, cell, cell_count)
Ejemplo n.º 8
0
 def fn(cell, cell_count):
     return simulate_cell_day(5, 0.207, cell, cell_count)
Ejemplo n.º 9
0
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)
Ejemplo n.º 10
0
 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)
Ejemplo n.º 11
0
 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)
Ejemplo n.º 12
0
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)