Halliday & Matthiessen (1999: 536-7):
To recapitulate with a very simple example: Given a pair of expressions such as in times of engine failure and whenever an engine failed the two are related to each other by grammatical metaphor. A particular phenomenon has been construed (i) as a prepositional phrase with a nominal group as its Complement, (ii) as a hypotactic clause introduced by a conjunction; moreover, the lexical content has been construed in two quite different ways:
If we take just the question of which elements function as Thing, the two are exactly complementary: in (i) the Thing nouns are time and failure, while in (ii) the only Thing noun is engine. This relationship is analogous to that of metaphor in its usual, lexical sense; only here the transfer is not between words but between grammatical classes.