/* Harvey Greenberg Fri Apr 18 11:05:18 PDT 2008 /* Creates a watershed mask with minimum extent for each of these watersheds: &s name3 alderbrook /* Not named 1:24K, build by hand? &s name4 big_bend /* tweaked to distinguish it from alderbrook &s name5 unnamed /* flowtweak5* needed to build basin &s name6 union_store /* Are you joking? One cell in x:/riverhistory/amir/hood_canal/hood_shed. Never mind, tweakdir6 made it work. &s name8 enati &s name9 twanoh &s name10 twanoh_falls &s name11 mulberg &s name12 happy_hollow &s name13 trails_end &s name14 hill &s name15 holyoke &s name16 finch &s name17 devereaux &s name19 stimson &s name20 miller &s name21 little_mission &s name22 eagle &s name24 lilliwaup &s name25 skokomish &s name26 jorsted &s name27 mission &s name28 dewatto &s name29 union &s name30 big_anderson &s name31 tahuya &s name32 stavis &s name33 wacketickeh &s name34 seabeck &s name36 big_beef &s name37 hamma_hamma &s name38 fulton &s name39 duckabush &s name40 dosewallips &s name41 big_quilcene &s name42 thorndyke &s name43 little_quilcene &s name44 tarboo &sys touch z:/www/areas/hood_canal/test_basins/centers /*&do n &list 3 4 5 6 8 9 10 11 12 13 14 15 16 17 19 20 21 22 24 25 26 27 28 29 30 31 32 33 34 36 37 38 39 40 41 42 43 44 &do n &list 9 10 11 12 13 14 15 16 17 19 20 21 22 24 25 26 27 28 29 30 31 32 33 34 36 37 38 39 40 41 42 43 44 /* skip tweaked ones for now &s name [value name%n%] &work Z:\WWW\AREAS\HOOD_CANAL\TEST_BASINS\%name% setwindow mask setmask mask &if [exist flowacc -grid] &then; kill flowacc flowacc = flowaccumulation(flowd) &describe flowacc tmprow = con(flowacc == %grd$zmax%,$$rowmap) tmpcol = con(flowacc == %grd$zmax%,$$colmap) &describe tmprow &if %grd$nclass% ne 1 &then;&RETURN Error getting the row &s row = %grd$mean% &describe tmpcol &if %grd$nclass% ne 1 &then;&RETURN Error getting the col &s col = %grd$mean% &typ %n% %name% %col% %row% &sys echo %n% %name% %col% %row% >> ../centers kill tmprow ; kill tmpcol &end setmask off setwindow maxof