[Thread Prev][Thread Next][Index]

Re: [ferret_users] stacking variables in time



Do you mean that each dataset (x,y,z) is a timestep? In that case using a descriptor file would make Ferret see them as one (x,y,z,t) dataset, after which a lot of things become easier. But descriptor files are a bit cumbersome to make (see discussions in the user group for semi-automatic ways to do it).

Another way to do it as a one-off would be to define the variance by hand (mean of anomalies squared).

let mean = (o_temp[d=1] + o_temp[d=2] + ...)/10
let var = ( (o_temp[d=1]-mean)^2 + (o_temp[d=2]-mean)^2 + ...)/10
let rms = var^.5

BK

On 20 Jan 2011, at 12:20 PM, Neil Swart wrote:

Hi,

I have a variable, say ocean temp(x,y,z,t) in ten separate datasets (on the same grid). I want to compute the variance in temperature (in space, at one time step) across the datasets. The easiest way I can think of would be to create a new variable, where my datasets 1...10 are stacked along the time axis. Then the variance could just be computed with t=@var. However, I'm struggling to successfully define
the new variable.

If I was not thinking like a ferret, it would be something like:

temp[l=1] = o_temp[t=5000,d=1]
temp[l=2] = o_temp[t=5000,d=2]...

I've tried save/append - but with no success either:

save/file=test.nc o_temp[t=5000,d=1]
save/append/file=test.nc o_temp[t=5000,d=2]

Can anyone suggest how to achieve this? Do I need to redefine time axis?

Many thanks,
Neil

---------------------------------------------------
Neil Swart

Climate Modelling Group
School of Earth and Ocean Sciences
University of Victoria
Victoria, BC
Canada

http://climate.uvic.ca/



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
William S. Kessler
NOAA / Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115 USA

william.s.kessler@xxxxxxxx
Tel: 206-526-6221
Fax: 206-526-6744
Web: http://www.pmel.noaa.gov/people/kessler



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement