[Thread Prev][Thread Next][Index]

Re: [ferret_users] Regarding Integration



Hi Sharad,
An integration is the sum over the area defined by the
curve, and the average is just a weighted mean of the
values.  The average of 1, 2, 1 on a regular grid is
1.33, but the integral is the sum of the area under
the curve (a box 1 unit high, plus a box 2 high, plus
a box 1 high)

  let a = {1,2,1}
  list/nohead a[x=@ave]  
  1.33

  list/nohead a[x=@din]
  4.0

The numbers Ferret calculates from your example 
include the units of the data and the size of the grid
boxes, but the essential difference is in how the two
functions are defined.

--- Sharad <sharad@caos.iisc.ernet.in> wrote:

> Hello All
> I am trying to calculate integration of salinity in
> mixed layer.For that I 
> have used @DIN function and to my surprise I am
> getting the value which is 
> more than values of salinity at different levels in
> mixed layer and avearge in 
> mixed layer.Here is script, 
> 
> let salt=salt_clim[d=2] 
> let  mld = HMXL_CLIM[d=1] 
> 
> !TO TAKE VALUES OF SALINITY IN ML 
> LET mask = IF z[g=salt]  LE mld THEN 1  ! else
> missing is implied 
> LET masked_salt = mask*salt 
> 
> !INTEGRATION 
> let salt_mask=masked_salt[k=@din] 
> let salt_mask_ave=masked_salt[k=@ave] 
> set reg/l=1/x=90/y=15 
> list masked_salt[k=1:10] 
> list mld,salt_mask,salt_mask_ave 
> 
>        I would like to know where I am doing mistake
> and is there any way to 
> rectify it.
> With regards
> ************************************
> Sharadkumar Yeri
> Centre for Atmospheric
> and Oceanic Sciences,
> Indian Institute of Science
> Bangalore-560 012
> INDIA
> **********************************
> 
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement