Commit e1d4f7e9 authored by Anthony's avatar Anthony
Browse files

Avoid stations with negative upstream area in HydroGraph/position.

parent 8a138780
......@@ -144,7 +144,9 @@ class HydroGraph :
def position(self, modelgrid, locations) :
npt, nbas = self.routing_fetch.shape
if len(locations.lid) > 0 :
for i,lid in enumerate(locations.lid) :
for i,lid in enumerate(locations.lid) :
# Some stations have a negative upstream area (because undefined)
if locations.upstream[i] > 0:
dist = RPP.distances(np.array(modelgrid.coordll)[:,0], np.array(modelgrid.coordll)[:,1], \
locations.lon[i], locations.lat[i])
# Calculation in km
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment