Assignment 3: Basin-scale flows and waves#

For this assignment you will do quantiative analysis of the basin flow (see Assignment 2: Wind-driven channel flow and basin-scale flow), and a qualitative analysis of planetary-scale waves in a basin.

Q1.1 Ekman pumping#

For both the f- and beta-plane simulations (basinfplane and basinbetaplane) there should be a convergence of fluid towards the central latitude of the basin. Show that, in steady state, this fluid is being pushed downwards at a rate expected by the wind forcing.

Q1.1.a Determine depth of Ekman layer#

Plot cross sections of v(x, z) at a couple of locations north and south of the central value of y, and estimate how deep the Ekman layer is. Compare with the theoretical Ekman depth.

import xarray as xr
import numpy as np
import matplotlib.pyplot as plt

def subplots_shared(n, m, sharex=True, sharey=True, layout='constrained', figsize=None):
    return plt.subplots(n, m, sharex=sharex, sharey=sharey, layout=layout, figsize=figsize)

def pcolormesh_sym(x, y, z, vbound, ax=None, cmap='RdBu_r'):
    if ax is None:
        ax = plt.gca()
    return ax.pcolormesh(x, y, z, vmin=-vbound, vmax=vbound, cmap=cmap, rasterized=True)

def tohours(Time):
    return Time.values.astype('float') / 1e9 /3600
# use the matplotlib widget
%matplotlib widget
# YOUR CODE HERE
raise NotImplementedError()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[2], line 2
      1 # YOUR CODE HERE
----> 2 raise NotImplementedError()

NotImplementedError: 

YOUR ANSWER HERE

Q1.1b Vertical velocity.#

Plot structure of w at base of Ekman layer, and comment on the structure.

Hint

Beware not to let the colour limits focus too much on the sides of the basin.

Discuss the structure, and note what is happeneing at the sidewalls (why?)

# YOUR CODE HERE
raise NotImplementedError()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[3], line 2
      1 # YOUR CODE HERE
----> 2 raise NotImplementedError()

NotImplementedError: 

YOUR ANSWER HERE

Q1.1c Compare w/ Ekman Pumping#

Compare the vertical velocity, say at x=75 km to the expected Ekman pumping velocity for both the f-plane and the beta-plane solutions

# YOUR CODE HERE
raise NotImplementedError()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[4], line 2
      1 # YOUR CODE HERE
----> 2 raise NotImplementedError()

NotImplementedError: 

YOUR ANSWER HERE

Q1.2 Sverdrup transport#

Fro the beta plane, calculate the vertically integrated transport across the middle latitude as a function of x, and compare to the Sverdrup transport.

# YOUR CODE HERE
raise NotImplementedError()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[5], line 2
      1 # YOUR CODE HERE
----> 2 raise NotImplementedError()

NotImplementedError: 

YOUR ANSWER HERE

Q1.2b Now plot what this transport looks like as a function of x and y#

# YOUR CODE HERE
raise NotImplementedError()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[6], line 2
      1 # YOUR CODE HERE
----> 2 raise NotImplementedError()

NotImplementedError: 

YOUR ANSWER HERE

Q1.3 Western boundary current#

Q1.3.a#

Plot the Sverdrup transport due to the north/south bottom stress, bearing in mind that it is quadratic with \(\tau_b^y/\rho = -C_D v|v|\), where \(C_D = 10^{-1}\). (This is actually an approximation - it should be \(\tau_b^y/\rho = -C_D v|\mathbf{u}|\), but the x-direction velocity is relatively modest). Compare to the volumn transport as you did above and comment.

# YOUR CODE HERE
raise NotImplementedError()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[7], line 2
      1 # YOUR CODE HERE
----> 2 raise NotImplementedError()

NotImplementedError: 

YOUR ANSWER HERE

Q1.3.b if return current on other side?#

Comment on the sense of torque if the return current were on the other side of the basin?

YOUR ANSWER HERE

Q1.3.c East/west flow#

Comment on the sense of the east/west flow in the basin in relation to the net north/south flow.

YOUR ANSWER HERE

Q2 Planetary waves: Qualitative#

Q2.1 Poincarre versus Kelvin waves.#

Run Poincarre12.py and Kelvin40.py. They are forced exactly the same way, by a Gaussian-shaped alternation of a wind stress at the east side of the basin. This is run in a 200-m deep ocean, with the upper 60 m at 30 degrees C, and the bottom 140 m at 10 degrees C.

Poincarre12.py is forced with a 12-h forcing period - note that the Coriolis period is \(T = \frac{2\pi}{f} = 17.45 h\), so these waves are “super-inertial”. Kelvin40.py is forced at 40 h, so these waves are sub-inertial.

Plot some time snaps of u or v near the surface. Describe the difference between the two forcings.

Note

The dominant response will be “internal waves” where the interface between the 10 and 30 degree water moves up and down. The buoyancy effect is such that these waves see a reduced gravity of \(g' \approx \frac{\delta \rho}{\rho} g \approx 0.0382 \ \mathrm{m\, s^{-2}}\).

# YOUR CODE HERE
raise NotImplementedError()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[8], line 2
      1 # YOUR CODE HERE
----> 2 raise NotImplementedError()

NotImplementedError: 

YOUR ANSWER HERE

Q2.2 Rossby waves#

Run Rossby200.py, Rossby300.py, Rossby400.py. These simulations are substantially larger, and have no temperature stratification - the waves excited are on the surface rather than an interface. If the forcing is slow and large scale, we generate Rossby waves. Here the wave maker is in the middle of the basin rather than along an edge.

Compare the response of these three simulations at a few time steps

# YOUR CODE HERE
raise NotImplementedError()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[9], line 2
      1 # YOUR CODE HERE
----> 2 raise NotImplementedError()

NotImplementedError: 

YOUR ANSWER HERE

Q2.2b Hovmoller#

Its a little hard to see the wave propagation in the above because the waves are so long relative to the basin size. Plot each simulation using a Hovmoller diagram, probably at the middle value of y (.isel(yt=35, yu=35)).

Try to interpret this - consider two things - phase speeds are set by the slope of the alternating bands. Group speed, which is the speed energy is propagating, is set by the slope of increasing amplitude of the waves. Try to pick these features out of the Hovmoller diagrams.

# YOUR CODE HERE
raise NotImplementedError()
---------------------------------------------------------------------------
NotImplementedError                       Traceback (most recent call last)
Cell In[10], line 2
      1 # YOUR CODE HERE
----> 2 raise NotImplementedError()

NotImplementedError: 

YOUR ANSWER HERE