Hate to tell you but historically the Romans fought in ranks that deep or that is how historians believed they fought.

A cohort would march around in a square formation due to that is the most maneuverable formation. But when they engaged they filled in the gap. A cohort with 80 men would make almost a perfect 9 by 9 square. So when they filled the gap they were probably only 4-5 ranks deep
So a typical Roman army of, let's say, 10 thousand men would line up its soldiers 4~5 ranks deep in a single line, which would spread the formation of 2000 x 5 men for 4 kilometers wide?

Or would they be stacked up with individual units of 80 men/5~6 ranks in the first line, second-line units behind them, third-line units behind, and reserves in the rear?