Diesel-electric train engine being repaired in the semi-abandoned train yard in Puerto Limon (Costa Rica).
Diesel-electric engine work this way: A diesel engine generate electricity by powering large generators, and this electricity then powers large electric motors attached to the axles of the wheels. This way there is no need for gears and a clutch, so the system is lighter, simpler and more efficient.
I jumped a fence to take those amazing photos. The train depot is (almost) abandoned. Several rusted, half disassembled diesel-electric train engines are sitting in the yard.