The pun used in the excerpt causes the reader to play with words. Pun basically refers to the forms of word play that gives you two or more meanings, depending on the word given. It is also called as paronomasia, where there's an exploitation of multiple meanings of words or words with similar sounds.
The simile of Lines 18 through 23 compares the storm clouds that whip across the sky from the horizon to the zenith to: locks of hair of a frenzied woman. (Ode to the West Wind).