A. Personification
Personification is a metaphor and a literary device that takes place when a thing, idea, abstract qualities, any aspect of nature, emotions or event is given human characteristics. This is used in the excerpt since the narrator gives human attributes to the sea: it carried him and threw him onto the shore as if the sea had the consciousness and will to perform such action as humans do.