Pathetic fallacy is attributing human emotions to nature or inanimate objects in literature.
John Ruskin coined the term in 'Modern Painters' (1856), and he meant it as a warning. He thought that when poets wrote of weeping clouds or angry seas they were committing a small lie — projecting human feeling onto a world that doesn't have any. Yet he also conceded that great writers earn the device when their characters' emotions are genuinely overwhelming. Shakespeare uses it constantly: the heath storms because Lear does, the night is unnatural because Macbeth has murdered a king. Romantic poets — Wordsworth, Shelley, Keats — built whole landscapes from it. Modern fiction tends to handle it more sceptically, but it never disappears: every film score that swells with the hero's grief is a pathetic fallacy in another medium.