Zonal Wind Stress

Mean zonal wind stress profile from different experiments.

Requirements: The conda/analysis3-20.01 (or later) module on the VDI (or your own up-to-date cookbook installation).


Wind stress, \(\tau\), transfers momentum from the atmosphere to the ocean.


import cosima_cookbook as cc
import matplotlib.pyplot as plt
from dask.distributed import Client
client = Client(n_workers=8)



  • Workers: 24
  • Cores: 48
  • Memory: 202.49 GB
session = cc.database.create_session()

The following code block shows the zonal- and time-averaged wind stress forcing for each experiment.

def calc_mean_tau_x(expt):

    tau_x = cc.querying.getvar(expt, 'tau_x', session, start_time=start_time)

    mean_tau_x = tau_x.mean('xu_ocean').mean('time')
    mean_tau_x = mean_tau_x.compute()
    mean_tau_x.name = expt

    return mean_tau_x
expts = ['01deg_jra55v13_ryf9091', '01deg_jra55_SAMextr_1011_from9091']

for expt in expts:
    mean_tau_x = calc_mean_tau_x(expt)
    plt.plot(mean_tau_x, mean_tau_x.yu_ocean,
             linewidth=2, label=expt)

plt.ylim([-75, -30])
plt.xlim([-0.03, 0.2])
plt.ylabel('Latitude [$^\circ$S]', fontsize=12)
plt.xlabel('Zonal Stress [N m$^{-2}$]', fontsize=12)
plt.legend(loc=8, fontsize=10)
plt.title('Wind Stress Zonal Means');


Computing the zonal mean by applying the operation .mean(dim='xu_ocean') is not correct. The error is particularly prominent in regions north of 65N, where the model uses the tripolar. The example here focusses in the Southern Hemisphere and thus we can get away by simply .mean(dim='xu_ocean').

For a thorough discussion on how to properly perform zonal averages see the DocumentedExamples/True_Zonal_Mean.ipynb notebook.

Download python script: Zonally_Averaged_Wind_Stress.py

Download Jupyter notebook: Zonally_Averaged_Wind_Stress.ipynb