Skip to content
This repository has been archived by the owner on Jan 6, 2019. It is now read-only.

Commit

Permalink
merge arcgis provider from qgis_plugin branch
Browse files Browse the repository at this point in the history
  • Loading branch information
landam committed Nov 19, 2018
2 parents ca94580 + 519d2eb commit e9590c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions smoderp2d/courant.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def CFL(self, i, j, h0, v, delta_t, efect_vrst, co, rill_courant):
#
# Also returns the ratio for the rill computation division.
#
def courant(self, rainfall, delta_t, efect_vrst, ratio):
def courant(self, rainfall, delta_t, ratio):

# ratio se muze zmensit a max_delta_t_mult zvetsit
# pokud je courant v ryhach <= 0.2
Expand Down Expand Up @@ -140,7 +140,7 @@ def courant(self, rainfall, delta_t, efect_vrst, ratio):
return self.max_delta_t * self.max_delta_t_mult, ratio

dt = round(
(efect_vrst * self.cour_crit * self.cour_coef) /
(Gl.mat_efect_vrst[self.i, self.j] * self.cour_crit * self.cour_coef) /
self.cour_speed,
4)

Expand Down
10 changes: 4 additions & 6 deletions smoderp2d/providers/arcgis/data_preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def run(self):
# intersect
self._add_message("Computing intersect of input data...")
intersect, null_shp, sfield = self._get_intersect(
gp, dmt_copy, veg_indata, soil_indata, vtyp, ptyp,
dmt_copy, veg_indata, soil_indata, vtyp, ptyp,
tab_puda_veg, tab_puda_veg_code
)

Expand All @@ -107,7 +107,7 @@ def run(self):

all_attrib = self._get_mat_par(sfield, intersect)

self._get_array_points(gp)
self._get_array_points()

self._get_a(all_attrib)

Expand Down Expand Up @@ -191,9 +191,8 @@ def _set_output(self):

temp_gdb = arcpy.CreateFileGDB_management(self.data['temp'], "tempGDB.gdb")

def _get_intersect(self, gp, dmt_copy, veg_indata, soil_indata, vtyp, ptyp, tab_puda_veg, tab_puda_veg_code):
def _get_intersect(self, dmt_copy, veg_indata, soil_indata, vtyp, ptyp, tab_puda_veg, tab_puda_veg_code):
"""
:param gp:
:param dmt_copy:
:param veg_indata:
:param soil_indata:
Expand Down Expand Up @@ -465,10 +464,9 @@ def _get_mat_par(self, sfield, intersect):

return all_attrib

def _get_array_points(self, gp):
def _get_array_points(self):
"""
:param gp:
"""

# getting points coordinates from optional input shapefile
Expand Down
2 changes: 1 addition & 1 deletion smoderp2d/runoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def run(self):
# update time step size if necessary (based on the courant
# condition)
self.delta_t, self.flow_control.ratio = self.courant.courant(
potRain, self.delta_t, Globals.spix, self.flow_control.ratio
potRain, self.delta_t, self.flow_control.ratio
)

# courant conditions is satisfied (time step did
Expand Down

0 comments on commit e9590c3

Please sign in to comment.