Esempio n. 1
0
 def get_area(self, elevation):
     if self.contours.length():
         area = nm.interpolate_from_table(elevation, self.contours.all(), 0,
                                          1)
     else:
         area = 0.0
     return area
Esempio n. 2
0
 def get_stage(self, storage, time):
     if self.time_stages.length():
         stage = nm.interpolate_from_table(time, self.time_stages.list, 0,
                                           1)
     else:
         stage = 0.0
     return stage
Esempio n. 3
0
 def get_area(self, elevation):
     if self.contours.length():
         area = nm.interpolate_from_table(elevation, self.contours.all(), 0, 1)
     else:
         area = 0.0
     return area
Esempio n. 4
0
 def get_runoff_ratio(self, time, peak_time):
     uh_couples = self.runoff_ratios.list
     runoff_ratio = nm.interpolate_from_table(time / peak_time, uh_couples, 0, 1)
     return runoff_ratio
Esempio n. 5
0
 def get_stage(self, storage, time=None):
     if self.stage_volumes.length():
         stage = nm.interpolate_from_table(storage, self.stage_volumes.all(), 1, 0)
     else:
         stage = 0.0
     return stage
Esempio n. 6
0
 def get_storage(self, elevation):
     if self.stage_volumes.length():
         storage = nm.interpolate_from_table(elevation, self.stage_volumes.all(), 0, 1)
     else:
         storage = 0.0
     return storage