Burning hydrocarbons is chemical reaction between oxygen and hydrocarbons. It results in heat, water and CO2. Heat, nutrients, light, water and CO2 make crops grow and produce oxygen. Tweaking the supply of these elements controls the growth of crops.
Organic waste from the agri-food -crops and livestock- and water production and processing can be converted into fuel. Biomass or biogas, are best-known hydrocarbon-based renewable energy sources.
Photovoltaic cells generate electric energy and heat. Put them on top of a greenhouse near brackish or seawater and one can control the light supply to the crops and produce water suitable to grow crops.
City waste can be sorted. Organic materials can be converted into fuel for the production of heat and power, plastics can be recycled to plastics and metals to metals. The remainder can be burnt to produce (distilled) water and to power water desalination units.
Crude oil and natural gas come to surface largely maintaining their subsurface temperature. To make crude oil and gas meet sales specifications, oil and gas and the associated water are separated from each other. To dry natural gas, large coolers are installed to make the temperature drop. The associated water can be processed to water suitable to feed crops.
In geothermal energy one focuses on the thermal capacity of the water. One could at the same time focus on taping water from the main stream to process it into drinking water, using the waste heat in the system.