[Thread Prev][Thread Next][Index]

Re: [ferret_users] Averaging Values are Mismatching



Hi,

Ferret computes averages as a weighted average, so the result will not in general be the same as a computing it as a sum divided by count.

In this case the weights are a 2-dimensional area of each grid cell. If the region you have specified cuts across grid cells, the weighting will take the area of those partial grid cells into account. When the computation is on the surface of the earth, Ferret also accounts for different size of longitude/latitude grid cells at different latitudes. That won't affect this calculation much since you are working near the equator.  Please see this discussion about averaging in the Ferret documentation, and follow the links in that section to the topics of "General Information on transformations" and the @WGT transformation which will let you look at the weights used in the calculation.

-Ansley



On 3/9/2017 5:24 AM, Abhishek Savita wrote:
Dear Ferreters,

                  I am using Pyferret and  getting some error when averaging the values. it is mismatching with the ferret calculation. Suppose I have average the values like

list/precision=7 D20[x=60.25:61.25@ave,y=-6.25:-5.25@ave,l=1]
 its value has come 60.39426

when I have listed the values as
list/precision=7/x=60.25:61.25/y=-6.25:-5.25 D20[l=1]
             VARIABLE : TEMP[Z=@LOC:20]
                        Z=-0.02:5500
             FILENAME : soda_d20_1958_2010_indpac.nc
             SUBSET   : 3 by 3 points (LONGITUDE-LATITUDE)
             TIME     : 15-JAN-1958 00:00
                60.25E    60.75E    61.25E 
                 61        62        63
 5.25S / 70:  64.47244  65.52505  67.76488
 5.75S / 69:  59.62996  59.87644  61.27785
 6.25S / 68:  55.80148  55.17461  55.52123

I  calculated analytical and It is giving  60.56349

When I have taken corresponding I and J values, I got as

list/precision=7 D20[i=61:63@ave,j=68:70@ave,l=1]
Its values has come   60.56349

 

Could you please suggest me, how to solve this problem

With regards
Abhishek


--
Regards
Abhishek Savita

Research Scholar (Earth System Science Technology)
Center For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute of Technology, Kharagpur
+91-8609704619

 


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

Privacy Policy | Disclaimer | Accessibility Statement