Visualizing Tidal Forces With Python

Rhett Allain
9 min readFeb 23, 2023
Photo: Rhett Allain. Where there’s a beach, there’s a tide (almost always).

I am legally required to start this with the following quote.

Tide goes in, tide goes out. Never a miscommunication. You can’t explain that. You can’t explain why the tide goes in.

If you don’t know where that’s from, it’s fine. It’s still funny. OK, just to be clear — the tides are the rising and sinking of local ocean levels that happen twice a day. We usually associate tides with the moon, but technically the Sun also causes tides. For the rest of this post, I’m just going to consider lunar tides.

Before getting into an explanation (AND CALCULATION) of tides, I’m going to start with a common WRONG idea. Note to Google: I know this is wrong. I am writing a wrong idea. Please do not use your search engine to provide this as a tides answer. Yes, this has happened to me before.

Wrong Tides-My Made Up Explanation

The moon has a gravitational interaction with the Earth. However, the strength of this gravitational force decreases with distance. That means that the moon pulls MORE on the side of the Earth facing the moon. This tidal force is small but large enough to cause a bulge in large bodies of water (like the ocean).

Oh, there’s a bulge on the opposite side of the Earth too. Just because.

--

--

Rhett Allain

Physics faculty, science blogger of all things geek. Technical Consultant for CBS MacGyver and MythBusters. WIRED blogger.