Fully renewable diesel is produced with algae oil and solar based methanol. Methanol is produced using CO2 and electrolytic hydrogen using solar or wind energy. Algae growing captures CO2 and requires solar energy. The problem is modelled to account for multiperiod operation of renewable sources. Solar energy is preferred as energy source with the need for area as the main drawback.