An unshaded roof that slopes towards the south will produce the most electricity for a given set of panels. However, even if your roof is more east or west facing, you can still get strong results. A west facing roof might produce 82% of what the same array on a south facing roof would produce. For this program, an array must produce more than 80% of what a south facing roof would produce, so an unshaded west facing roof is fine.
And if you have a flat roof you can orient your panels to maximize efficiency.