Yes. 'Train whistle' is a compound noun, which means that both
'train' and 'whistle' are nouns individually but here they work
together. The word 'train' is applied to 'whistle' in the place of
an adjective, that is, a word that describes the type of
whistle.
But have you ever heard a wolf whistle?
Many compound nouns eventually run together, like handbook or
cupboard, and maybe one day, wolfwhistle.