Skip to content

Commit

Permalink
make area default to eltype(cellarea) and to NaN fill
Browse files Browse the repository at this point in the history
  • Loading branch information
mauro3 committed May 23, 2024
1 parent af32487 commit 54a4dba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WhereTheWaterFlows.jl
Original file line number Diff line number Diff line change
Expand Up @@ -346,8 +346,8 @@ end
# initialize output cellarea:
# - as tuple or one array
# - as tuple, if cellarea is a tuple
init_area(dir, cellarea) = (fill!(similar(dir,Float64), 0), )
init_area(dir, cellarea::Tuple) = map(x -> fill!(similar(dir,Float64), 0), cellarea)
init_area(dir, cellarea) = (fill!(similar(dir, eltype(cellarea)), NaN), )
init_area(dir, cellarea::Tuple) = map(x -> init_area(dir,x)[1], cellarea)

# modifies c and area
function _flowrouting_catchments!(area, len, c, dir, cellarea, feedback_fn, color, ij)
Expand Down

0 comments on commit 54a4dba

Please sign in to comment.