E-folding time of anomalies

Friday May 15, 2009

Continuing my open notebook science post about the ENSEMBLES project.

The first thing I did after downloading all the data was to calculate the e-folding time of sea surface temperature (SST) anomalies. This timescale is an indication of how long the anomalies take to decay to `1/e` of the original value — for SST, this is in the order of a few months, usually.

This is my Python script. First, the usual imports:

from numpy import *
from scipy import *
from pylab import *
from pynetcdf import NetCDFFile as netcdf_file 

Then we proceed to read the NetCDF file that was generated before:

f = netcdf_file('/Users/roberto/Research/TFSP/stream2/ts.nc')
ts = f.variables['ts']
lat = f.variables['latitude']
lon = f.variables['longitude']

# dimensions
ENSEMBLE = f.dimensions['ensemble']
YEAR = f.dimensions['time']  # year the integration started
INTEGRATION = f.dimensions['z']  # integration time (months)
LATITUDE = f.dimensions['latitude']
LONGITUDE = f.dimensions['longitude']
SPACE = LATITUDE*LONGITUDE

We can now calculate the zonally averaged e-folding time of SST anomalies on all different ensembles:

ef = zeros((ENSEMBLE, LATITUDE), 'f')
for member in range(ENSEMBLE):
    # remove seasonal cycle
    tsa = ts[member] - resize(mean(ts[member], axis=0), ts[member].shape)
    tsa.shape = (YEAR, INTEGRATION, SPACE)

    # calculate autocorrelation for JFM-FMA
    ar = zeros((SPACE,), 'f')
    for i in range(SPACE):
        ar[i] = corrcoef(tsa[:,2:5,i].flat, tsa[:,3:6,i].flat)[0,1]
    ar.shape = (LATITUDE, LONGITUDE)

    # calculate e-folding time and do zonal average
    efi = -1/log(ar)
    efi[isnan(efi)] = 0.0
    ef[member,:] = mean(efi, axis=1)

And we can finally plot the results using matplotlib:

title('Zonal averaged e-folding time of SST anomalies')
xlabel('Ensemble member')
ylabel('latitude')
yticks(arange(-90, 120, 30))

X, Y = meshgrid(range(ENSEMBLE), lat[:])
contourf(X, Y, ef.T, arange(0, 13, 1), extend='max')
cb = colorbar(drawedges=True)
cb.set_label('months')

params = {
    'horizontalalignment': 'center',
    'verticalalignment': 'center',
    'fontsize': 8,
}
text(4.5, 0, "ECMWF\nIFC/HOPE", **params)
text(13.5, 0, "MetOffice\nHadGEM2", **params)
text(22.5, 0, "Meteo-France\nARPEGE/OPA", **params)
text(31.5, 0, "INGV\nECHAM5/OPA", **params)
text(40.5, 0, "IfM Kiel\nECHAM5/OM1", **params)

savefig('zonal_efolding_ssta.png')

Here’s the resulting image:


The general behavior displayed by all models is more persistent SST anomalies in the Tropics and the northern Subtropics, except for the INGV ECHAM5/OPA model. I still need to read more about each different model setup to understand why this is happening.

Roberto De Almeida

,

---

Comment

Commenting is closed for this article.

---