Electrification has been the weapon of choice for long but Installing new electric infrastructure on previously un-electrified routes ran into cost and engineering obstacles, which cuts off that option for some railways.
Trains can also be electrified with on-board batteries, like any other electric vehicle. However, battery packs for locomotives and other heavy-duty uses can take forever to charge, leading to conflicts with scheduling and fleet availability in some cases.
That finally brings us to hydrogen fuel cells, which produce electricity by exposing hydrogen and ambient oxygen to a catalyst, so fuel cell locomotives are electrification, but with a difference. Locomotive fuel cell systems can deploy batteries as well as fuel cell stacks, so you get the best of both worlds.
The primary source of the global hydrogen supply is natural gas, which means that switching from a diesel engine to a fuel cell isn’t all it’s cracked up to be, decarbonization-wise. Fortunately, hydrogen from renewable resources is coming on the scene.
Green H2 sources include biogas, biomass, wastewater, seawater and just about any old water. Industrial waste gas and solid waste are also in the mix.
Decarbonization is not simply a matter of dumping out the old fuel and introducing the new. Lifecycle carbon impacts also come into play.
Reference- Clean Technica, Wikipedia, Arcola Energy website, Futurism