The process of converting excess renewable energy into hydrogen or methane gas for storage and later use.