Sum of the cell values of its first upstream cell(s)
Result = upstream(ldd, material)
spatial, non spatial scalar
For each cell the neighbour cells that have a local drain direction on ldd towards the cell are determined. These are cells that drain directly to the cell. On Result the cell is assigned the sum of the material values of these first upstream cells. This is done for each cell.
A cell with a missing value on ldd or material is assigned a missing value on Result. Additionally the downstream neighbour of a missing value cell on material is assigned a missing value on Result.
This operation belongs to the group of Neighbourhood operators; local drain directions
- • pcrcalcbindingResult = Result.map;Ldd = Ldd.map;Expr = Expr.map;initialreport Result = upstream(Ldd, Expr);• pythonLdd = readmap(“Ldd.map”)Expr = readmap(“Expr.map”)Result = upstream(Ldd, Expr)