コード例 #1
0
ファイル: test_model.py プロジェクト: kothawadegs/tr-55
 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'])
コード例 #2
0
ファイル: test_model.py プロジェクト: mehmadi/tr-55
 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'])
コード例 #3
0
ファイル: test_model.py プロジェクト: HydroLogic/tr-55
 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"])
コード例 #4
0
ファイル: test_model.py プロジェクト: kothawadegs/tr-55
 def fn(cell, cell_count):
     return simulate_cell_day(7, 0.107, cell, cell_count)
コード例 #5
0
ファイル: test_model.py プロジェクト: kothawadegs/tr-55
 def fn(cell, cell_count):
     return simulate_cell_day(5, 0.207, cell, cell_count)
コード例 #6
0
ファイル: test_model.py プロジェクト: kothawadegs/tr-55
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)
コード例 #7
0
ファイル: test_model.py プロジェクト: mehmadi/tr-55
 def fn(cell, cell_count):
     return simulate_cell_day(7, 0.107, cell, cell_count)
コード例 #8
0
ファイル: test_model.py プロジェクト: mehmadi/tr-55
 def fn(cell, cell_count):
     return simulate_cell_day(5, 0.207, cell, cell_count)
コード例 #9
0
ファイル: test_model.py プロジェクト: mehmadi/tr-55
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)
コード例 #10
0
ファイル: makeMiniAppTable.py プロジェクト: HydroLogic/tr-55
 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)
コード例 #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)
コード例 #12
0
ファイル: test_model.py プロジェクト: HydroLogic/tr-55
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)