The characters in the self-discovery melodrama “Year by the Sea” are in danger of drowning — not in the cold North Atlantic waters, but in the tidal wave of maritime metaphors unleashed by the script.

Based on three books of memoirs by writer Joan Anderson, the movie starts with Joan (played by Karen Allen) watching her oldest son, Andy (Tyler Haines), getting married. With younger son Luke (Graham King) also grown up, Joan is feeling empty-nest syndrome, and feeling neglected by her businessman husband, Robin (Michael Cristofer), who announces that for business reasons they’re moving from upstate New York to Wichita, Kan.

Joan rejects Kansas and Robin, leaving to rent a broken-down cottage on Cape Cod, Mass., where she aims to reconnect with the person she was before becoming a wife and mother. She’s encouraged by Liz (S. Epatha Merkerson), her best friend and literary agent, to write her thoughts down for a book.

First, though, Joan gets to know the locals in the town near her accessible-by-rowboat cottage. She helps out Luce (Monique Gabriela Curnen), a diner waitress with an abusive husband (Kohler McKenzie). She lands a part-time job running the cash register at a fish market, run by a hunky clamdigger, Cahoon (Yannick Bisson). And she befriends Joan Erikson (Celia Imrie), a free-spirited therapist with a positive outlook — even as her psychoanalyst husband is slowly diminishing to dementia and failing health.

Alexander Janko, a film-score composer (“My Big Fat Greek Wedding,” “The Girl on the Train”), makes his debut here as a director and screenwriter, and the smartest thing he does is to shoot on Cape Cod and capture the beauty Joan is experiencing there.

The storyline is rather shapeless, though, juxtaposing Joan’s experiences as a Cape Cod newbie with her written observations of her personal growth. These statements are delivered in voiceover, undigested chunks of clichéd verbiage — “I am as unfinished as the shoreline along the beach, meant to transcend myself again and again” is a sample line — presumably taken straight from Anderson’s books.

There are moments in “Year by the Sea” when Joan, Liz and Joan Erikson are having fun and letting their hair down, when the overwrought script falls by the wayside and the characters are living the full lives Anderson writes about. One wishes Janko had abandoned the script and allowed Allen, Merkerson and Imrie to form a book club, sipping wine and laughing uproariously.

* *

Year by the Sea

A woman moves to Cape Cod to rediscover herself in this talky melodrama based on Joan Anderson’s memoirs.

Where • Area theaters.

When • Opens Friday, Sept. 29.

Rating • Not rated, but probably PG-13 for language, some violence and sexual dialogue.

Running time • 114 minutes.