[MITgcm-support] calc_boxmean_T() function
gael forget
gforget at mit.edu
Thu Nov 27 08:22:35 EST 2014
Hi Weston,
I think that a correct call would have been
test = calc_boxmean_T(theta(:,:,1,1),'LATS',[-5 5],'LONS', [-180:1:180],'level',1);
based upon the help section (type 'help calc_boxmean_T’ in matlab).
This is a function I had not used much recently. When I retested
it on tuesday, I found that a couple things were not particularly
practical, and revise it accordingly @
http://mitgcm.org/viewvc/MITgcm/MITgcm_contrib/gael/matlab_class/gcmfaces_calc/calc_boxmean_T.m
The revision should not change anything for what you were trying to do,
but I would suggest that you update your copy of calc_boxmean_T.m
Cheers,
Gael
On Nov 24, 2014, at 3:53 PM, Weston Anderson <weston.b.anderson at gmail.com> wrote:
> 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
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20141127/3b18f407/attachment-0001.htm>
More information about the MITgcm-support
mailing list