A while ago, I wondered if houses would eventually have two circuits, one DC for solar panels, and one AC for grid power. You are my hero.
I live on the first floor, and our roof is 30 feet above. Would there be any problem with a wire that long? Would I keep the batteries up above or down on the first floor?
At such low voltage, there is a lot of loss in the wires. There further the power has to travel, the thicker the wires have to be in order to minimize resistance (which will waste voltage in the form of heat). According to:
http://www.solar-wind.co.uk/cable-sizing-DC-cables.html to go 30ft (9 meters) at up to 20 amps and 12v, you need AWG 7 wire, which is already fairly thick, but would still result in 5% power loss. You would get better results with something even thicker.
Alternatively, you can run multiple thinner wires all in parallel with each other, for example 4 awg-10 for positive and 4 awg-10 for negative.
I would put the batteries on the first floor. You are likely to draw more current from the batteries all at once (for example, when first starting many electric motors, it draws a surge current), while the panels basically trickle charge the batteries all day. If the battery is closer to the load, the wires going from battery to load don't need to be as thick.
Think of a car: the alternator wire is fairly thin, while the wire going to the starter is enormous. Better to not have to have the super thick wire running 30ft. It would get very expensive.
Plus, you wouldn't want to store batteries on the roof, as they should be temperature controlled - extreme heat and cold will both damage them - and it would be easier to monitor and maintain them if they are closer to home.