Unfortunately putting a floor over the roof will not prevent freezing, it will still be considered light and above-ground, and thus be at the mercy of the climate.
If you're trying to build a natural ice-wall building, you need to fill the mold with water while it's under a natural stone or soil floor. It absolutely has to be done from scratch entirely underground, then channel out the natural floor on top.
______________________________________________________________________________________________________________________________
If you're trying to get an ice-machine to make blocks of ice, then what you need to do is this;
dig 2 identical chambers under your water chamber. All 3 should be 1 z-level tall. The topmost should contain the water, the next will contain
MAGMA And the third will be empty in the beginning. The floor of the second chamber needs to be dug out and replace with magma-safe
retracting bridge(s), the first and third must be natural stone floors. You will need pumps and a source of extra magma to bring magma back up to the second chamber, and a pump to pump water into the top chamber at the same level, it must not be dropped from above or pressure will allow it to be multiple levels deep and it will also instantly freeze, creating cave-ins or floor over the chamber (it will still be above-ground and freezing though.) Link the retracting bridge(s) to a lever.
Now fill the middle with magma,
then the upper chamber with water, and make sure the lower is clear. When you're ready to make ice, pull the lever that controls the retracting bridges under the second level, dropping the magma into the third. The top-most level should instantly freeze into ice as soon as the magma has fallen to the lower level.
Voila, instant dwarven ice machine. You can't transport it underground though or it will melt again
Supporting evidence: rain-of-doomy-ice machine, used to be on the list here;
http://www.bay12forums.com/smf/index.php?topic=54532.0This all depends on temperatures still being
wonky normal enough in the latest version for the magma to keep the water warm while directly underneath it, and let it freeze when not directly underneath it (which makes perfect sense in reality. How did you think geysers work? land whales? It's water contacting super-heated, but not molten, rock.)