/* writes an ascii file with xy and other info for each outlet /* This version checks upstream &s cover streams /* standard argument for createstremnetwork.aml &severity &error &ignore /* For rerunning it. &if [exist %cover% -arc] and ^ [exist knodes -point] &then ; &do build %cover% arc nodepoint streams knodes build knodes point addxy knodes &end GRID setwindow mask;setcell mask;setmask mask flowacc = flowaccumulation(flowd) &if [exist %cover% -arc] ^ [exist nodegrid -grid] &then nodegrid = pointgrid(knodes) tinypours = con(isnull(nodegrid) and (Z:\WWW\AREAS\HOOD_CANAL\MISSION\MASTER\flength == 0),1) tinypourcover = gridpoint(tinypours) QUIT latticespot flowacc tinypourcover flowacc &if [exist %cover% -arc] &then ; &do latticespot flowacc knodes flowacc relate add;known;knodes.pat;INFO;TNODE#;KNODES#;linear;rw;;; &ty [delete ttotals -info] /* statistics streams.aat ttotals tnode#;sum maxmsq;end /* relate add;tot;ttotals;INFO;TNODE#;TNODE#;linear;ro;;; /* &end addxy tinypourcover tables &if [exist %cover% -arc] &then ; &do additem %cover%.aat outkmsq 4 9 f 4 /* sel %cover%.aat asel;resel downarc = -1 calc outkmsq = known//flowacc * maxmsq / tot//SUM-MAXMSQ * .0225 /* unload pourpoints.txt known//x-coord known//y-coord outkmsq %cover%# # INIT &end sel tinypourcover.pat calc tinypourcover-id = 0 unload tinypourpoints.txt x-coord y-coord flowacc tinypourcover-id # INIT quit /* to arc