An historical example of the use of metaphor and simile in science writing:
"These wrecks of a former state of nature, thus wonderfully preserved (like ancient medals and inscriptions in the ruins of an empire), afford a sort of rude chronology, by whose aid the successive depositions of the strata in which they are found may be marked out in epochs more or less definitely terminated, and each characterized by some peculiarity which enables us to recognise the deposits of any period, in whatever part of the world they may be found."
Sir John Frederick William Herschel
Herschel, J. F. W. (1830). Preliminary Discourse on the Study of Natural Philosophy.
Fossils are not literally 'wrecks' (i.e., shipwrecks), so this is a metaphor.
Preservation "like" ancient medals and inscriptions can be consideeed simile.
Read about examples of science similes
This comparisons can also be understood as an analogy, as the 'wreck', the fossil, survives like ancient artefacts that are intact among the ruins of an empire (the deceased organism, other parts of which have ben degraded and destroyed).