Assignment 2: Wind-driven channel flow and basin-scale flow#

For this assignment you will do quantiative analysis of the channel flow (see Assignment 1: Flow over an obstacle and channel flow), and a qualitative analysis of flow in a basin under wind stress curl.

Q1.1 Stress with no rotation#

For the simulation with no rotation (channelnof), plot a profile of the x-momentum stress that is transmitted in the vertical direction at a point in the middle of the channel. Do this at something like 12 h into the simulation.

What is the net acceleration of the water parcel due to this stress profile?

Recall that the surface stress is equal to \(\tau_w = 0.2 \ \mathrm{N\,m^{-2}}\), and the vertical viscosity is \(\kappa = 10^{-3}\ \mathrm{m^2\,s^{-1}}\). What will the velocity and stress profile look like at steady state (flow no longer accelerating), or is there a steady state?

import xarray as xr
import numpy as np
import matplotlib.pyplot as plt
# 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: 

This flow is not in steady state yet. Steady state would be a linear profile of velocity with \(\nu \partial u / \partial z = \tau_w / \rho\) so \(u(z=0) = 10 \ \mathrm{m\,s^{-1}}\). This would lead to a constant stress through the water column As it is, the flow is faster above than below, and the stress is higher with increasing z, so momentum is converging with depth and \(\partial u / \partial t>0\).

Note that the time scale for this to be in steady state is \(T\approx H^2 / \kappa \approx 28\) days, so we would have to run the simulation for considerably longer to see the steady state behaviour.

Q1.2 Geostrophic balance (interior)#

For the f-plane simulation (channelfplane) show that the interior of the flow (away from the Ekman layers) is approximately in geostrophic balance with the surface flow. Note that \(f=10^{-4}\ \mathrm{rad\,s^{-1}}\). I did this by comparing the size of \(u\) with the size of \((g/f) \partial \eta / \partial x\) across the whol y-z cross-section.

Hint

Remember that the surface pressure, \(g\eta\), is given by psi in veros.

Describe where in the water column the geostrophic balance is poor.

# 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.3 Ekman balance#

Plot as a time-series and demonstrate that the Ekman Transport reaches the expected value in the upper part of the water column and that there is an equal and opposite Ekman transport in the bottom boundary layer. You can do this with y at the center of the channel.

Hint

The tendency would be to use integrate to do the integral. However a lot of the Ekman transport is in the first grid cell, and the trapezoid rule does a poor job at the boundary. Suggest you use sum instead (and multiply by the correct dz for each cell).

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

NotImplementedError: 

Q1.4 Ekman spiral#

Show that the velocity in the upper and lower Ekman layers follow the Ekman spiral solution in the upper ocean and near the sea floor. Also add the two Ekman layer solutions together and compare to the observed profile.

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

NotImplementedError: 

Q2: Wind-driven basin: Qualitative#

In this simulation an 80x80km 200-m deep basin is used. Wind is blown on it so that it blows strongest to the west at the south side of the box, and strongest to the east atthe top of the box, so \(\tau_x^w = -0.1 \cos\left(\pi \frac{y}{y_{max}}\right)\). There are two runs, where \(f=f_0 = 10^{-4}\ \mathrm{rad \, s^{-1}}\), and a second where f increases towards the north: \(f = f_0 + \left( 10^{-9} \left( ms \right)^{-1} \right) y\)

To make the simulation output, please run basinfplane.py and basinbetaplane.py.

Q2.1: plot the wind stress as a function of y#

Note that this is stored in ds.surface_taux (and ds.surface_tauy). Describe a) what direction youd expect the Ekman transport to be at \(y=40\ \mathrm{km}\) and at \(y=130\ \mathrm{km}\) b) describe what must happen between these two “latitudes” given these Ekman transports. c) What direction is the water being “torqued” (twisted)? d) hwo do you think the water will move in this flow given that it will be close to geostrophic balance.

# 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

Q2.2#

Plot four or so snapshots of basinfplane.py and basinbetaplane and compare and contrast the behaviour over time. I suggest plotting psi which is the sea surface pressure anomally \(g\eta\) using contours, overtop of pcolor of the north-south velocity \(v\).

Note that there is an Ekman layer, so \(v(z=0)\) is interesting, but a bit misleading for the over-all circulation. ds.v.mean(dim='zt') is a useful pcolor to make, or you could choose a depth out of the Ekman layer.

What are the similarities and differences between the two simulations? Which one looks more like the real ocean?

# 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