The rough estimate of the amount of damage a tonne of CO2 released into the atmosphere causes is $196 (source: wikipedia).
A an economy class return flight from Munich to Barcelona (a typical night train distance) releases 0.45 tons of CO2 per passenger resulting in an additional cost of $88.2 (72.6€), 36.3€ per leg.