Vertical structure of 7-day period inertial-gravity waves in the equatorial Pacific
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Summer 2010


This repository contains code for what should become Cherian, Farrar & Durland (201x) - The upper-ocean vertical structure of 7-day period inertial-gravity waves in the equatorial Pacific.


To reproduce all of the figures you will first need to

Then images/ will contain all figures used in the paper.


The code expects the following layout.

-- eq_waves
----- data/
---------- dynht/dyn*.cdf
---------- temp/t*.cdf
---------- woa_landsea_01.msk
----- images/
----- scripts/*.m
----- (this file)

Overall Scripts

master.mRecreate everything from scratch.
figs_paper.mMake figures used in paper.
TestInference.mRuns tests with fake data.
InferOneLocation.mRecreates everything but for just one specified location
DefaultOptions.mConveniently creates default options structure
with values used in paper
PlotMode.mPlots mode structure at one location.
PlotModeMap.mPlots mode structure at all locations as big map.
Calls PlotMode to do actual plotting.
ReadTaoTriton.mReads in data. Can do so at just one location if needed.
TheoreticalModes.mCalls vertmode with WOA data, calculates mode structures
and saves them in flat-bottom-modes.mat

Analysis Scripts

InferModeShape.mDoes most of the heavy lifting
DoRegression.mCalls dcregress for regression between provided variables.
Also estimates error bounds.
EstimateNoiseSpectrum.mFits a power law to spectrum of provide input.
Returns amplitude α and spectral slope β such that spectrum, S = αeβ
CalcSignificanceBounds.mCalculates minimum regression slope that would indicate that
a regression is not returning a null result. Calls TestMC to
do iterations between data and red noise time series.
SaveNullBoundsForTao.mRuns CalcSignificanceBounds at every available instrument depth
and saves results to bounds.mat so they can be used by ~InferModeShape
figs.mCode for various figures made during analysis.

Utility Scripts

TestMC.mRuns monte carlo iterations between provided input and
noise timeseries with provided properties.
Called by CalcSignificanceBounds to do the hard work.
dcregress.mDoes the actual regression
BandPass.mBandPass filters
FilterSeries.mDoes the actual filtering
synthetic_timeseries_known_spectrum.mCreates fake time series with specified spectral properties.
(code from Tom Farrar)
GappySpectrum.mCalculates spectrum of a gappy timeseries.
findCommmonTimeRange.mFinds common time range for dyn ht and temperature time Series
getTitleString.mCreates a formatted title string for plots.