ENSO.Oscillator

Conceptual model for ENSO. This is a rewrite of a Fortran program used in Choi et al (2013).

The main function is oscillator() which is a generator that yields ENSO SST anomalies indefinitely after being initialised.

ENSO.Oscillator.dT_func(h, T, a, b, e)[source]

dT = a*h-b*T-e*(T^3.)

Parameters:
  • a (positivie number) – regression coefficient between SST anomaly growth rate and thermocline depth anomaly
  • b (positive number) – surface damping time scale (in /month)
  • e (positive number) – cubic damping rate (i.e. ϵ in Eq.1 of Choi et al. 2013)
Returns:

dT (K/month)

Return type:

numeric

ENSO.Oscillator.lag_time(ck, cr, x_W, x_E, x_force)[source]

Compute the lag times for (1) Kelvin waves and (2) Rossby waves + reflected Kelvin waves to reach the eastern boundary.

i.e. the difference of the two is the time lag between positive feedbacks and negative feedbacks of ENSO

Parameters:
  • ck (number) – Kelvin wave speed in m/s
  • cr (number) – Gravest Rossby wave speed in m/s
  • x_W (number) – Longitude of western boundary (in degree)
  • x_E (number) – Longitude of eastern boundary (in degree)
  • x_force (number) – Longitude of the wind forcing
Returns:

lag time for positive feedbacks, lag time for negative feedbacks (units: month)

Return type:

(number, number)

ENSO.Oscillator.oscillator(tstep, a, b, c, d, e, gam, r, lag_long, lag_short, T0, h0, noise_generator, noise_update_freq=0.2, warmseasonal=None, coldseasonal=None)[source]

Generator for simulating ENSO SST anomaly under a conceptual framework and a nonlinear air-sea coupling coefficient. (see Choi et al. (2013))

Parameters:
  • tstep (number) – time step size (in month)
  • a (positivie number) – regression coefficient between SST anomaly growth rate and thermocline depth anomaly, as in dT_func()
  • b (positive number) – surface damping time scale (in /month), as in dT_func()
  • c (positive number) – regression coefficient between SST anomaly growth rate and the zonal wind stress anomaly with a time lag characterised by the positive feedbacks (i.e. c' in Eq.1 of Choi et al. 2013)
  • d (positive number) – negative of the regression coefficient between SST anomaly growth rate and the zonal wind stress anomaly with a time lag characterised by the negative feedbacks (i.e. d' in Eq.1 of Choi et al. 2013)
  • e (positive number) – cubic damping rate (i.e. ϵ in Eq.1 of Choi et al. 2013)
  • gam (number) –

    mean regression coefficient between wind stress and temperature anomalies (i.e. gamma in Eq.2 of Choi et al (2013).)

  • r (number) – nonlinearity, greater than -1. and less than 1. Zero means no nonlinearity. Positive values mean a stronger air-sea coupling coefficient during warm condition than during cold condition
  • lag_long (number) – time lag for the negative feedback to arrive (in month)
  • lag_short (number) – time lag for the positive feedback to arrive (in month)
  • T0 (number) – Initial SST anomaly
  • h0 (number) – Initial thermocline depth anomaly
  • noise_generator (generator) – to be added to the zonal wind stress anomaly
  • noise_update_freq (number) – how frequently the noise is updated (in month)
  • warmseasonal (scalar or an array) – see wind()
  • coldseasonal (scalar or an array) – see wind()
Yields :

T (number) – SST anomaly at the current time step

ENSO.Oscillator.wave_speeds(drho, hbar, verbose=False, fout=None)[source]

Calculate the Kelvin and Rossby wave speed

Parameters:
  • drho (number) – approximate density ratio between the surface mixed layer and the deeper ocean (less than 1.)
  • hbar (number) – mean thickness of the surface mixed layer
  • verbose (bool) –
  • fout (File Object) – if None, default is sys.stdout
Returns:

Kelvin wave speed, Rossby wave speed, in m/s

Return type:

(number, number)

ENSO.Oscillator.wind(temp, gam, r, warmseasonal=None, coldseasonal=None, mon=1)[source]

Compute the zonal wind anomaly given an SST anomaly

Assume a piecewise linear relationship between the zonal wind stress anomaly and the SST anomaly (see Choi et al (2013).)

Parameters:
  • temp (number) – temperature anomaly
  • gam (number) –

    mean regression coefficient between wind stress and temperature anomalies (i.e. gamma in Eq.2 of Choi et al (2013).)

  • r (number) – nonlinearity, greater than -1. and less than 1. Zero means no nonlinearity. Positive values mean a stronger air-sea coupling coefficient during warm condition than during cold condition
  • warmseasonal (scalar or a numpy array of numbers) – for varying coupling coefficient in different calendar month for the warm condition. The value is to be multiplied to the wind anomaly. Length = 12 (Jan, Feb,...). Default is 1 (i.e. no seasonality)
  • coldseasonal (scalar or a numpy array of numbers) – similar to warmseasonal, but for cold condition.
  • mon (int) – calendar month (1-12). Only meaningful when warmseasonal or coldseasonal is not 1.
Fork me on GitHub