Skip to content

Commit

Permalink
Update src/WaterFlow.jl
Browse files Browse the repository at this point in the history
Co-authored-by: Albert de Montserrat <[email protected]>
  • Loading branch information
boriskaus and albert-de-montserrat authored Jul 2, 2024
1 parent 07deceb commit 9324c16
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/WaterFlow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,13 @@ function waterflows(Topo::GeoData, flowdir_fn= WhereTheWaterFlows.d8dir_feature;

dem = Topo.depth.val[:,:,1]

area = zeros(Float64,size(Topo.depth.val))
slen = zeros(Int64,size(Topo.depth.val))
dir = zeros(Int8,size(Topo.depth.val))
nout = zeros(Int8,size(Topo.depth.val))
nin = zeros(Int8,size(Topo.depth.val))
c = zeros(Int64,size(Topo.depth.val))
ni = size(Topo.depth.val)
area = zeros(ni)
slen = zeros(Int64, ni)
dir = zeros(Int8, ni)
nout = zeros(Int8, ni)
nin = zeros(Int8, ni)
c = zeros(Int64, ni)

area[:,:,1], slen[:,:,1], dir[:,:,1], nout[:,:,1], nin[:,:,1], sinks, pits, c[:,:,1], bnds = waterflows(dem, cellarea, flowdir_fn;
feedback_fn=feedback_fn, drain_pits=drain_pits, bnd_as_sink=bnd_as_sink)
Expand Down

0 comments on commit 9324c16

Please sign in to comment.