Note that most of these schemes are built a non-divergent model of flow direction downslope. While this is fine for DEM-derived networks, it might require that the network be pre-processed (pruned, generally cleaned up) to enforce this assumption prior to applying the selected ordering scheme (from which we extract the "main stem").
The algorithm walks upstream from outlet segment, selecting to travel up the tributary with the longest accumulated flowlength. This is repeated until a headwater segment is reached.
(from the GRASS documentation on stream ordering)
"the main stream of every subcatchment is the longest stream or stream with highest accumulation rate."
In most cases, the main stream is the longest watercourse of the catchment, but in some cases, when a catchment consists of both rounded and elongated subcatchments these rules may not be maintained. The algorithm assigns 1 to every outlet stream and goes upstream according to the maximum flow accumulation of every branch. When it reaches an initial stream, it steps back to the first unassigned confluence. It assigns order 2 to unordered tributaries and again goes upstream to the next initial stream. The process repeats until all branches of all outlets are ordered.
This requires first calculating Strahler ordering and then making a second pass, wherein the algorithm walks upstream from outlet segment, selecting to travel up to the tributary with the highest stream order. In the case of a tie in the Strahler order of the tributaries, the tributary with the longest accumulated flowlength is selected (as in Hack ordering). The process repeats until all branches of all outlets are ordered.
Kristine Verdin (USGS) is longtime champion of this kind of scheme. Probably would be a smart plan to talk w/her about applying this method.