Ed Sheeran penned a moving song paying tribute to his grandmother on the day she died.

The British musician is gearing up to release his new album ÷ (divide) in March (17), and he has revealed that one of its tracks, Broken Flowers, was written about his beloved grandmother Anne, who passed away while he was on hiatus last year (16).

Speaking to British newspaper The Sun about writing the heartfelt song he says, "That was the day my gran passed away. I was at my home. It's just a knee-jerk reaction. You can be really upset and dwell on something or you can put all the good memories in one song."

Ed credits Anne with inspiring himself and his brother Matthew, a classical composer, to pursue a career in music.

"I just wanted to make a tribute to my gran," he explains. "She was the musical one in my family. Hopefully I will pass that on to my kids."

Supermarket Flowers is not the first time Ed has honoured his grandparents in song, as the track Afire Love, which appeared on his second album x (multiply) was written about Anne's husband Bill, who died in 2013.

Although ÷ (divide) is not available until 3 March (17), it has already spawned one U.K. number one single, Shape of You, which hit the top of the charts after its release on 6 January (17).

Another single, Castle on the Hill, was released on the same day and reached number two.

The success of the new tracks indicates a glorious year ahead for the 25-year-old, but he has set himself the tough task of outselling fellow Brit superstar Adele.

"Adele is the one person whos sold more records than me in the past ten years," he tells Britain's GQ magazine. "She's the only person I need to sell more records than. That's a big f**king feat because her last album sold 20 million. But if I don't set her as the benchmark then I'm selling myself short."