Provides estimate of spring neap cycle for problem 4 on 2007 final exam for Waves and Tides (MAR 558).


In [ ]:
import numpy as np
import matplotlib.pyplot as plt

In [ ]:
Fma = 2.
Fmb = 2.
Fs = 1.
Tb = 28 * 2.
dt = 1.  # Degrees.

tmb = np.arange(0, 361., 1)
tma = tmb * 2.

mask = tma > 360.
tma[mask] = tma[mask] - 360.

ts = 0 * tmb

Fmb_x = np.abs(np.cos(tmb * (np.pi / 180)) * Fmb)
Fmb_y = np.abs(np.sin(tmb * (np.pi / 180)) * Fmb)

Fma_x = np.abs(np.cos(tma * (np.pi / 180)) * Fma)
Fma_y = np.abs(np.sin(tma * (np.pi / 180)) * Fma)

Fs_x = np.abs(np.cos(ts * (np.pi / 180)) * Fs)
Fs_y = np.abs(np.sin(ts * (np.pi / 180)) * Fs)

F = np.sqrt((Fmb_x + Fma_x + Fs_x)**2 + (Fmb_y + Fma_y + Fs_y)**2)

days = Tb * tmb / 360.

In [ ]:
fig, (ax0, ax1) = plt.subplots(ncols=2, figsize=(16, 4), sharey=True)
ax0.plot(days, F)
ax0.set_ylabel('Relative Strength of Tidal Forcing')
ax0.set_xlabel('Days (Assuming faster moon completes one full cycle around earth in 28 days)')
ax0.set_xlim(0, Tb)

ax1.plot(tmb, F)
ax1.set_xlabel('Angular Position (degrees) of slower moon')
_ = ax1.set_xlim(0, 360)

In [ ]: