[Thread Prev][Thread Next][Index]

Re: need help to understand the variance calculation in ferret



Hi Yogesh
The calculation Ferret does for the variance transformation goes as follows,

- compute the mean of the data
- take the sum of the (data - mean) squared.
- divide this sum by N.

The computations are done on the the data weighted by the grid cell sizes,
so they are correct for irregularly-spaced grids. That is, the sum of the data
in the computation of the mean is data*box_size, and this sum is divided
by the sum of the box sizes.

Note that you can get the number of points in any direction for your
data variable A, with

yes? let npts = `A,return=isize`

or,

yes? let npts = A[I=@NGD]

Ansley

Yogesh K. Tiwari wrote:

Hello Ferret Users,

I do not fully understand how ferret calcuttes the variance(uncertainity).

I have zonal mean time series(monthly) of one year CO2 concentration satellite data.I want to calculate the variance of the zonal mean CO2.

I want to do something like :-

If there are N measurements of a random variable then
the variance of the mean of the random variable is given
by
sigma(N samples)= sigma (random variable) / sqrt(N)


where sigma (random variable) is the variance of
of the random variable. I.e. to estimate the variance
(uncertainty) of the zonal mean CO2 I would count
how many values have been used for building the zonal
mean (this number is the N in the formula above). Then use the uncertainty valid for each of the satellite CO2 estimates separrately
and divide by sqrt(N) to obtain the uncertainty of
the zonal mean CO2 value.

In fact here I don't want to divide by sqrt(N) but by something called N_effective. This is because neighbouring CO2 values within a zonal band are not fully independent. For doing this right it is necessary to
calculate spatial correlations between CO2 timeseries.
The correlation length can then be used to calculate
N_effective.

I just did follwoing to calculate the variance in the ferret :-

NOAA/PMEL TMAP
FERRET v5.53
Linux(g77) 2.4.20 - 10/16/03
19-Jan-05 13:53


yes? set data.cdf

yes?plot/vlimits=0.05:3.0/dash airs[x=@var,l=@ave,y=-40:40]^0.5


Now the question, whether I am right in ferret above commands, OR

If not, then how I can calculate the variance in ferret in the way as I described above.

Many Many thanks in advance for the help,

Regards,
Yogesh







[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement