[MITgcm-support] calc_boxmean_T() function

Weston Anderson weston.b.anderson at gmail.com
Mon Nov 24 15:53:05 EST 2014


Hi All,

I'm new to gcmfaces and am trying to use ECCO v4 to calculate the average
potential temperature (averaged between 5S and 5N) at 1 degree longitude
intervals around the globe for a specific time step at all depths using
 calc_boxmean_T(). (i.e. expecting a vertical slice along the equator [a
value for each depth/degree interval])

I am initially just trying to get the function to work for a single time
and single depth (surface) but have been unable to do so. I've run out of
documentation to consult and unfortunately I can't follow the source code
of the function well enough to see what I'm doing wrong.

I suspect that I'm misinterpreting input specification of 'line vector of
latitutde interval edges' for the LAT, LON inputs to calc_boxmean_T(), but
have tried a number of things unsuccessfully.

below is the basic code I'm trying (after initializing the gcmfaces
package):
%----------%--------%--------%--------%--------%--------%--------%

%define the time steps of interest:
climSt = 1998; %for now use full years for the climatology
climEn = 2012;
climSteps = [((climSt-1992)*12)+1,((climEn-1992)*12)];

%       read_nctiles(file, var, time, depth)
tName = '
http://mit.ecco-group.org/opendap/ecco_for_las/version_4/release1/nctiles/THETA/THETA
';
theta = read_nctiles(tName,'THETA',climSteps(1):climSteps(2),1);

% calculate the mean potential temp between [-5 and 5] at the surface at 1
deg intervals for time step 1
test = calc_boxmean_T(theta(:,:,1,1), [-5 5], [-180:1:180], 1)

%----------%--------%--------%--------%--------%--------%--------%

Could someone point me towards how to use this function correctly?

Thanks in advance,
Weston

-- 
PhD Candidate
Columbia University
Dept. of Earth & Environmental Science
Lamont-Doherty Earth Observatory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20141124/761fddcd/attachment.htm>


More information about the MITgcm-support mailing list