  Observations with the Herschel Space Telescope have established that most of
the star forming gas is organised in interstellar filaments, a finding that is
supported by numerical simulations of the supersonic interstellar medium (ISM)
where dense filamentary structures are ubiquitous. We aim to understand the
formation of these dense structures by performing observations covering the
$^{12}$CO(4-3), $^{12}$CO(3-2), and various CO(2-1) isotopologue lines of the
Musca filament, using the APEX telescope. The observed CO intensities and line
ratios cannot be explained by PDR (photodissociation region) emission because
of the low ambient far-UV field that is strongly constrained by the
non-detections of the [C II] line at 158 $\mu$m and the [O I] line at 63
$\mu$m, observed with the upGREAT receiver on SOFIA, as well as a weak [C I]
609 $\mu$m line detected with APEX. We propose that the observations are
consistent with a scenario in which shock excitation gives rise to warm and
dense gas close to the highest column density regions in the Musca filament.
Using shock models, we find that the CO observations can be consistent with
excitation by J-type low-velocity shocks. A qualitative comparison of the
observed CO spectra with synthetic observations of dynamic filament formation
simulations shows a good agreement with the signature of a filament accretion
shock that forms a cold and dense filament from a converging flow. The Musca
filament is thus found to be dense molecular post-shock gas. Filament accretion
shocks that dissipate the supersonic kinetic energy of converging flows in the
ISM may thus play a prominent role in the evolution of cold and dense
filamentary structures.
