I didn't try to calculate the amount of energy it produces in a year, just the length of panels required to power a high speed train when the sun is shining. 18,000 watts / 100 meters is 180 watts per meter. At 180 watts per meter, 50 km gives you 9 MW, which is about what a high speed train consumes at cruise.
This is incorrect. 18000 Wp/100m = 180 Wp/m or 180 kWp/km. So parent is correct, and you can either add or drop a "k".
That is peak power, obtainable in summer months & muuch less in winter.
Over the whole year: 16000 kWh/100m = 160 kWh/m = 160 MWh (160,000 kWh) per km.