A roof garden is a garden on the roof of a building. Besides the decorative benefit, roof plantings may provide food, temperature control, hydrological benefits, architectural enhancement, habitats or corridors for wildlife, recreational opportunities, and in large scale it may even have ecological benefits. The practice of cultivating food on the rooftop of buildings is sometimes referred to as rooftop farming. Rooftop farming is usually done using green roof, hydroponics, aeroponics or air-dynaponics systems or container gardens.
Humans have grown plants atop structures since the ziggurats of ancient Mesopotamia (4th millennium BC–600 BC) had plantings of trees and shrubs on aboveground terraces. An example in Roman times was the Villa of the Mysteries in Pompeii, which had an elevated terrace where plants were grown. A roof garden has also been discovered around an audience hall in Roman-Byzantine Caesarea. The medieval Egyptian city of Fustat had a number of high-rise buildings that Nasir Khusraw in the early 11th century described as rising up to 14 stories, with roof gardens on the top story complete with ox-drawn water wheels for irrigating them.
Roof gardens are most often found in urban environments. Plants have the ability to reduce the overall heat absorption of the building which then reduces energy consumption. "The primary cause of heat build-up in cities is insolation, the absorption of solar radiation by roads and buildings in the city and the storage of this heat in the building material and its subsequent re-radiation. Plant surfaces however, as a result of transpiration, do not rise more than 4–5 °C above the ambient and are sometimes cooler." This then translates into a cooling of the environment between 3.6 and 11.3 degrees Celsius (6.5 and 20.3 °F), depending on the area on earth (in hotter areas, the environmental temperature will cool more). The study was performed by the University of Cardiff.
A study at the National Research Council of Canada showed the differences between roofs with gardens and roofs without gardens against temperature. The study shows temperature effects on different layers of each roof at different times of the day. Roof gardens are obviously very beneficial in reducing the effects of temperature against roofs without gardens. “If widely adopted, rooftop gardens could reduce the urban heat island, which would decrease smog episodes, problems associated with heat stress and further lower energy consumption.”
Aside from rooftop gardens providing resistance to thermal radiation, rooftop gardens are also beneficial in reducing rain run off. A roof garden can delay run off; reduce the rate and volume of run off. “As cities grow, permeable substrates are replaced by impervious structures such as buildings and paved roads. Storm water run-off and combined sewage overflow events are now major problems for many cities in North America. A key solution is to reduce peak flow by delaying (e.g., control flow drain on roofs) or retaining run-off (e.g., rain detention basins). Rooftop gardens can delay peak flow and retain the run-off for later use by the plants.”
“In an accessible rooftop garden, space becomes available for localized small-scale urban agriculture, a source of local food production. An urban garden can supplement the diets of the community it feeds with fresh produce and provide a tangible tie to food production.” At Trent University, there is currently a working rooftop garden which provides food to the student café and local citizens.
Available gardening areas in cities are often seriously lacking, which is likely the key impetus for many roof gardens. The garden may be on the roof of an autonomous building which takes care of its own water and waste. Hydroponics and other alternative methods can expand the possibilities of roof top gardening by reducing, for example, the need for soil or its tremendous weight. Plantings in containers are used extensively in roof top gardens. Planting in containers prevents added stress to the roof's waterproofing. One high-profile example of a building with a roof garden is Chicago City Hall.
For those who live in small apartments with little space, square foot gardening, or (when even less space is available) green walls (vertical gardening) can be a solution. These use much less space than traditional gardening (square foot gardening uses 20% of the space of conventional rows; ten times more produce can be generated from vertical gardens). These also encourage environmentally responsible practices, eliminating tilling, reducing or eliminating pesticides, and weeding, and encouraging the recycling of wastes through composting.
Becoming green is a high priority for urban planners. The environmental and aesthetic benefits to cities is the prime motivation. It was calculated that the temperature in Tokyo could be lowered by 0.11–0.84 °C if 50% of all available rooftop space were planted with greenery. This would lead to a savings of approximately 100 million yen 
Singapore is active in green urban development. "Roof gardens present possibilities for carrying the notions of nature and open space further in tall building development." When surveyed, 80% of Singapore residents voted for more roof gardens to be implemented in the city's plans. Recreational reasons, such as leisure and relaxation, beautifying the environment, and greenery and nature, received the most votes. Planting roof gardens on tops of building is a way to make cities more efficient.
A roof garden can be distinguished from a green roof, although the two terms are often used interchangeably. The term roof garden is well suited to roof spaces that incorporate recreation, entertaining, and provide additional outdoor living space for the building's residents. It may include planters, plants, dining and lounging furniture, outdoor structures such as pergolas and sheds, and automated irrigation and lighting systems.
Although they may provide aesthetic and recreational benefits a green roof is not necessarily designed for this purpose. A green roof may not provide any recreational space and be constructed with an emphasis towards improving the insulation or improving the overall energy efficiency and reducing the cooling and heating costs within a building.
Green roofs may be extensive or intensive. The terms are used to describe the type of planting required. The panels that comprise a green roof are generally no more than a few inches up to a foot in depth, since weight is an important factor when covering an entire roof surface. The plants that go into a green roof are usually sedum or other shallow-rooted plants that will tolerate the hot, dry, windy conditions that prevail on most rooftop gardens. With a green roof, "the plants layer can shield off as much as 87% of solar radiation while a bare roof receives 100% direct exposure".
The planters on a roof garden may be designed for a variety of functions and vary greatly in depth to satisfy aesthetic and recreational purposes. These planters can hold a range of ornamental plants: anything from trees, shrubs, vines, or an assortment of flowers. As aesthetics and recreation are the priority they may not provide the environmental and energy benefits of a green roof.
The related idea of a living machine is based on the most basic cycle of gardening: using wastes (organic waste and sewage), appropriately broken down, usually in some specialized container, on the soil, and harvesting food which, when processed, generates biodegradable waste, and when eaten, generates sewage. In most of the world, this kind of very tight closed loop gardening is used, despite certain health risks if necessary precautions are not taken. Composting human or pet waste should achieve thermophilic conditions and age for at least a year before being used.
Media related to Roof gardens at Wikimedia Commons