Module 1 : Introduction to Tides

Learning Objectives

I. What causes tides?

II. How does the moon impact tides?

III. How do the Sun and Moon work together to influence tides?

IV. What are Neap and Spring tides?

What causes tides?

Tides are caused by gravitational attraction to nearby celestial bodies. The water on Earth is affected mainly by the Moon, because it is so close, and the Sun, because it is so massive.


In [1]:
# Before we can get started, we are going to import some python packages that will be needed to run this notebook.
import os
import pandas as pd
import matplotlib.pyplot as plt
from ipywidgets import interact, interactive, fixed
from IPython.display import Image, display
from tydal import module1_utils
from tydal import MoonCycleDates as mcd
from tydal import module1_fancy_graphs as mfg
from tydal import quiz1
from matplotlib.offsetbox import TextArea, DrawingArea, OffsetImage, AnnotationBbox
import matplotlib.image as IM
import matplotlib._png

The Moon's contribution to tides

First, we will look at the influence of the Moon on Earth's water. The easiest way to explain this is to imagine the Earth being covered completely by ocean. This allows the water to flow without running into any continents, which complicates the resulting tides. The primary bulge on the surface of the Earth facing the Moon is intuitive; The Moon is on that side and its gravity pulls the water toward it. The secondary bulge on the opposite face of the Earth is more elusive. The center of mass of the Earth-Moon system is located inside the Earth, but slightly closer to the Moon. As the Earth-Moon system rotates around this center of mass, the centripetal force pushes water to the outside, which is the side opposite the Moon. The tidal bulge can be seen in blue below. The Earth is the green circle and the Moon is the grey circle.


In [2]:
Image("./Figures/TidalBulge.jpg")


Out[2]:

The moon revolves around the Earth as the Earth rotates around its axis. The period of Earth's rotation is 24 hours, while the period of the Moon's revolution around the Earth is ~28 days. As the Earth rotates underneath the Moon, it moves through the Moon's tidal bulge. This can be seen in the figure below. A single point on Earth has been highlighted as a red dot. Initially, the red dot starts out at the crest of the tidal bulge and is experiencing high tide. After 6 hours, the red dot has moved underneath the bulge and has moved to the trough of the bulge known as low tide. Continuing through the day, the red dot experiences another crest (high tide) and another trough (low tide) before returning to the initial position at high tide.


In [3]:
Image ("./Figures/Earth_Moon_Tides_Simple.jpg")


Out[3]:

A location on Earth where there are two high tides and two low tides with equal amplitude experiences semidiurnal tides. This can be seen by plotting some tide data from North Carolina (below).


In [4]:
%matplotlib inline

# Lets load in some tide data

NCdata = pd.read_csv("./Data/SemiDiurnalTides.csv", parse_dates=["Date Time"])

# And let's look at what data we have
NCdata.head()


Out[4]:
Date Time Water Level Sigma
0 2016-03-07 18:00:00 0.123 0.659
1 2016-03-07 18:06:00 0.169 0.692
2 2016-03-07 18:12:00 0.241 0.689
3 2016-03-07 18:18:00 0.278 0.682
4 2016-03-07 18:24:00 0.386 0.738

In [5]:
NCdata.tail()


Out[5]:
Date Time Water Level Sigma
256 2016-03-08 19:36:00 -0.024 0.243
257 2016-03-08 19:42:00 0.120 0.230
258 2016-03-08 19:48:00 0.218 0.279
259 2016-03-08 19:54:00 0.294 0.246
260 2016-03-08 20:00:00 0.428 0.292

In [6]:
NCdata.columns


Out[6]:
Index(['Date Time', 'Water Level', 'Sigma'], dtype='object')

As you can see from the top of this data, we have three columns. These columns hold data for the time that the water level measurement was taken, the measured water level, and Sigma, representing the uncertainty in the measurement. Now that we know what makes up our data, let's plot it.


In [7]:
# This ploting function takes in five arguments: 
# a dataset, a start time, an end time, a title, and a size
module1_utils.tidal_plot(NCdata, "2016-03-07 18:00:00", "2016-03-08 20:00:00",
                         title="North Carolina Tides", sized=(15,8))


<matplotlib.figure.Figure at 0x115128ba8>

As you can see, there are two low tides and two high tides of equal amplitude.

Let's slice the data to see just one cycle: from 1 ft elevation, to high tide, to low tide, back to 1 ft elevation. That looks like that starts just after 19:00:00 and ends around 08:30. Let's trim the data to reflect this and plot it again.


In [8]:
# This is the same function as above
module1_utils.tidal_plot(NCdata, "2016-03-07 19:16:00", "2016-03-08 08:30:00",
                         title="One Tidal Cycle", sized=(12,6))


<matplotlib.figure.Figure at 0x1151d6780>

The tidal period, however is not exactly 24 hours. The Moon revolves around the Earth in the same direction that the Earth rotates around its axis. As such, after 24 hours the Moon has advanced past its original position. To make up for the progress of the Moon, the Earth has to rotate for an additional 50 minutes to be positioned underneath the moon. The correct representation is shown below.


In [9]:
Image("./Figures/Earth_Moon_Tides_Real.jpg")


Out[9]:

The Sun's contribution to tides

The Sun, although much more massive than the Moon, is farther away from Earth than the Moon and has less of an effect on the Earth's tides than the Moon. However, it still creates its own tidal bulge. The bulge from the sun is similar to the one formed by the moon. Thus, the resulting bulge that the Earth sees is a sum of the two bulges: the one from the Moon and the one from the Sun. The tidal bulge due to the Sun is in yellow and the tidal bulge from the Moon is in blue.


In [10]:
Image("./Figures/SunMoon_sum.jpg")


Out[10]:

Phases of the Moon

First, we will review the phases of the Moon. The amount of the moon that is visible (illuminated) from Earth is dependent on its position relative to the Earth and Sun. When the Moon is positioned between the Sun and the Earth, it is called a New Moon, as shown below. If you look at the moon you will not see it because the illuminated side is facing away from us.

The dates corresponding to each phase of the moon for 2014 are included in a list and are displayed below each image.


In [11]:
Image("./Figures/NewMoon.jpg")


Out[11]:

In [12]:
mcd.New_2014


Out[12]:
['20140101',
 '20140130',
 '20140301',
 '20140330',
 '20140428',
 '20140528',
 '20140627',
 '20140726',
 '20140825',
 '20140923',
 '20141023',
 '20141122',
 '20141221']

When the Moon makes it a quarter of the way around the Earth, or 90 degrees, it has reached the phase known as First Quarter. At the point the right half of the moon is illuminated when viewed from Earth, as seen below.


In [13]:
Image("./Figures/FirstQuarter.jpg")


Out[13]:

In [14]:
mcd.First_2014


Out[14]:
['20140107',
 '20140206',
 '20140308',
 '20140407',
 '20140506',
 '20140605',
 '20140705',
 '20140803',
 '20140902',
 '20141001',
 '20141030',
 '20141129',
 '20141228']

When the Moon has moved another quarter of the way around Earth, it reaches the phase known as Full Moon. When viewed from the Earth, the whole moon is illuminated and visible.


In [15]:
Image("./Figures/FullMoon.jpg")


Out[15]:

In [ ]:
#To test loading of moon image
FullMoon = plt.imread("./Figures/FullMoonA.png")

In [16]:
mcd.Full_2014


Out[16]:
['20140115',
 '20140214',
 '20140316',
 '20140415',
 '20140514',
 '20140612',
 '20140712',
 '20140810',
 '20140908',
 '20141008',
 '20141106',
 '20141206']

Continuing through another quarter of the way around Earth puts it in the Third Quarter postion. At this point, the left half of the Moon is illuminated when viewed from Earth.


In [17]:
Image("./Figures/ThirdQuarter.jpg")


Out[17]:

In [18]:
mcd.Third_2014


Out[18]:
['20140123',
 '20140222',
 '20140323',
 '20140422',
 '20140521',
 '20140619',
 '20140718',
 '20140817',
 '20140915',
 '20141015',
 '20141114',
 '20141214']

In [ ]:
#To save the dates in a date time format that matches our tidal data for ease of ploting
New_2014_dates = mcd.mcddatetime(mcd.New_2014)
First_2014_dates = mcd.mcddatetime(mcd.First_2014)
Full_2014_dates = mcd.mcddatetime(mcd.Full_2014)
Third_2014_dates = mcd.mcddatetime(mcd.Third_2014)

To see this monthly effect, let's plot a month of data. We have a new data set for this demonstration, so we will load that in first and then parse out a month period.


In [19]:
# Just to clarify, we are loading the data for three tidal stations at once here.
# They are Neah Bay (NB), Port Townsend, (PT), and Port Angeles (PA).
# We will only explore the Neah Bay in this section, but will use the other
# stations later.

[NB, PT, PA] = module1_utils.load_tide_station_data()

This data is similar in form to the data used above. We can check that by displaying the head and tail of the data.


In [20]:
NB.head()


Out[20]:
Date Time Water Level Sigma
0 2014-01-01 00:00:00 0.026 0.049
1 2014-01-01 00:06:00 -0.197 0.043
2 2014-01-01 00:12:00 -0.427 0.033
3 2014-01-01 00:18:00 -0.624 0.043
4 2014-01-01 00:24:00 -0.788 0.049

In [21]:
NB.tail()


Out[21]:
Date Time Water Level Sigma
79901 2016-11-29 22:06:00 6.768 0.082
79902 2016-11-29 22:12:00 6.594 0.075
79903 2016-11-29 22:18:00 6.453 0.072
79904 2016-11-29 22:24:00 6.329 0.069
79905 2016-11-29 22:30:00 6.165 0.069

Let's plot the full cycle from Full Moon to Full Moon using the lists above. This will allow us to see how the position of the Moon relative to the Earth and Sun can affect the strength of the tides.

I'll plot November 1st to December 10th. During this range there is a Full Moon (11/6), a Third Quarter Moon (11/14), a New Moon (11/22), a First Quarter Moon (11/29), and back to a Full Moon (12/6).


In [22]:
module1_utils.tidal_plot(NB, "2014-11-01 00:00:00", "2014-12-10 00:00:00",
                         title="Neah Bay Tides", sized=(15,8))


<matplotlib.figure.Figure at 0x1156ffe10>

A second plot shows the same data but with the dates of the moon cycle indicated by text and picture


In [ ]:
mfg.plot_NB_Full_to_Full()

Notice how the tides change based on the phase of the moon. The tidal range, the distance between the high tide and the low tide, is at a maximum during a New Moon or Full Moon and at a minimum during a First or Third Quarter Moon.


In [23]:
module1_utils.tidal_plot(PT, "2014-11-01 00:00:00", "2014-12-10 00:00:00",
                         title="Port Townsend Tides", sized=(15,8))


<matplotlib.figure.Figure at 0x11a129978>

In [ ]:
mfg.plot_PT_Full_to_Full()

In [24]:
module1_utils.tidal_plot(PA, "2014-11-01 00:00:00", "2014-12-10 00:00:00",
                         title="Port Angeles Tides", sized=(15,8))


<matplotlib.figure.Figure at 0x1068882e8>

In [ ]:
mfg.plot_PA_Full_to_Full()

Now we are going to look at a year's worth of data for each of the ports


In [25]:
NB_2014 = module1_utils.trim_data(NB, "2014-01-01 00:00:00", "2014-12-31 23:54:00")
PT_2014 = module1_utils.trim_data(PT, "2014-01-01 00:00:00", "2014-12-31 23:54:00")
PA_2014 = module1_utils.trim_data(PA, "2014-01-01 00:00:00", "2014-12-31 23:54:00")
NB_2014.head()


Out[25]:
Date Time Water Level Sigma
Date Time
2014-01-01 00:00:00 2014-01-01 00:00:00 0.026 0.049
2014-01-01 00:06:00 2014-01-01 00:06:00 -0.197 0.043
2014-01-01 00:12:00 2014-01-01 00:12:00 -0.427 0.033
2014-01-01 00:18:00 2014-01-01 00:18:00 -0.624 0.043
2014-01-01 00:24:00 2014-01-01 00:24:00 -0.788 0.049

In [26]:
NB_2014.tail()


Out[26]:
Date Time Water Level Sigma
Date Time
2014-12-31 23:30:00 2014-12-31 23:30:00 -0.354 0.016
2014-12-31 23:36:00 2014-12-31 23:36:00 -0.381 0.010
2014-12-31 23:42:00 2014-12-31 23:42:00 -0.361 0.013
2014-12-31 23:48:00 2014-12-31 23:48:00 -0.332 0.013
2014-12-31 23:54:00 2014-12-31 23:54:00 -0.325 0.013

Spring and Neap Tides

Spring Tides

A Spring tide occurs when the Sun, Earth, and Moon are in a line, as in a New Moon or Full Moon. This causes the tidal bulges from the Sun and Moon to align and results in a higher high tide and a lower low tide.


In [32]:
Image("./Figures/SunMoon_Full.jpg")


Out[32]:

Here we are looking at each port on a full moon date


In [34]:
module1_utils.tidal_plot(NB, "2014-05-13 22:00:00", "2014-05-15 04:00:00",
                         title="Neah Bay Full Moon Tides", sized=(15,8))


<matplotlib.figure.Figure at 0x106835e48>

The high tide here is at 8ft and the low tide is at almost -2ft. That is a tidal range of 10 ft!

Let's plot using the interactive bar a few more Full Moon days and compare the ranges.


In [35]:
interact(module1_utils.moon_cycle_exploration, data=fixed(NB_2014), cycle_days=mcd.Full_2014)


<matplotlib.figure.Figure at 0x11a12db38>
Out[35]:
<function tydal.module1_utils.moon_cycle_exploration>

Now let's look at all three ports on this full moon


In [38]:
mfg.plot_3Station_FullMoon()


Comparing with New Moon tides, which are also Spring Tides


In [40]:
mfg.plot_3Station_NewMoon()


Neap Tides

A Neap Tide occurs when the Moon is perpendicular to the line through the center of the Earth and Sun. This occurs during First and Third Quarters. This causes the tidal bulges to counter each other and results in a lower high tide and a higher low tide.


In [41]:
Image("./Figures/SunMoon_Third.jpg")


Out[41]:

We can explore the Third Quarter cycles as we did for the Full and New Moon dates.


In [43]:
interact(module1_utils.moon_cycle_exploration, data=fixed(NB_2014), cycle_days=mcd.Third_2014)


<matplotlib.figure.Figure at 0x11541d8d0>
Out[43]:
<function tydal.module1_utils.moon_cycle_exploration>

Now let's look at all three ports on this third quarter moon


In [ ]:
mfg.plot_3Station_ThirdMoon()

Neap tides also occur during the First Quarter Phase. Explore these dates below.


In [44]:
interact(module1_utils.moon_cycle_exploration, data=fixed(NB_2014), cycle_days=mcd.First_2014)


<matplotlib.figure.Figure at 0x119c244a8>
Out[44]:
<function tydal.module1_utils.moon_cycle_exploration>

Now lets look at the first quarter moon phase and it effects on all three ports


In [46]:
plot_3Station_FirstMoon()



In [48]:




In [ ]:

Tide changes over different ports in same area

Using the tide data from Neah Bay, Port Townsend, and Port Angeles we can see how the tides vary between stationsf ro each moon phase. We will start with a New Moon.


In [49]:
%matplotlib inline #Is this needed?

interact(module1_utils.multistation_moon, data=fixed([NB_2014, PT_2014, PA_2014]), cycle_days=mcd.New_2014)


Out[49]:
<function tydal.module1_utils.multistation_moon>

We can also explore the First Quarter Moon


In [50]:
interact(module1_utils.multistation_moon, data=fixed([NB_2014, PT_2014, PA_2014]), cycle_days=mcd.First_2014)


Out[50]:
<function tydal.module1_utils.multistation_moon>

The Full Moon...


In [51]:
interact(module1_utils.multistation_moon, data=fixed([NB_2014, PT_2014, PA_2014]), cycle_days=mcd.Full_2014)


Out[51]:
<function tydal.module1_utils.multistation_moon>

And Third Quarter...


In [52]:
interact(module1_utils.multistation_moon, data=fixed([NB_2014, PT_2014, PA_2014]), cycle_days=mcd.Third_2014)


Out[52]:
<function tydal.module1_utils.multistation_moon>

In [53]:
mfg.plot_3Station_High_Low()


Notice in the figure above that each station (in same geographical area=Washington State) the water level chnages between the three. This is due to the ebb and flow of the tides into the sound. Notice the steep positive slopes to flat to steep negative slope and back.


In [55]:
Image("./Figures/MapOfStations.jpg")


Out[55]:

In [ ]:
mfg.plot_NB_New_to_New()

# Module 1 Quiz


In [41]:
quiz1.quiz()


Module 1 Quiz (5 questions)

Question 1: Why is the Earth affected by the Moon?

a. Massive
b. Close/Proximity
c. It isn't
Make your choice: c
Incorrect
Question 2: How many high and low tides are there in a day?

a. 2 high, 1 low
b. 1 high, 1 low
c. 2 high, 2 low
Make your choice: d
Incorrect
Question 2: How many high and low tides are there in a day for a semidurinal tideal day?

a. 2 high, 1 low
b. 1 high, 1 low
c. 2 high, 2 low
Make your choice: d
Incorrect
Question 3: The tidal period is of of 24 hours by __ due to the Earth's roation about it's axis?

a. None
b. 50 minutes
c. 1 hour
Make your choice: d
Incorrect
Question 4: Spring tide causes tidal bulges to be ___ high tide and ___ low tide?

a. higher, lower
b. higher, higher
c. lower, higher
Make your choice: d
Incorrect
Question 5: Neap tide (First and Third Quarter moon) causes tidal bulges to be ___ high tide and ___ low tide?

a. higher, lower
b. higher, higher
c. lower, higher
Make your choice: d
Incorrect
Go to Module 2