[Thread Prev][Thread Next][Index]

R: Re: [ferret_users] Different results between ferret and other softwares



Dear All,
thanks for the quick responses. 

Just some more clarifications: the file has only 1 vertical level and the 
matlab function mean2 performs the mean of the whole matrix.

According to the tips I received, I have computed with ferret the non-weighted 
average as:

tas[x=@sum,y=@sum]/tas[x=@ngd,y=@ngd]

and now the results are the same between matlab and ferret. 
However, I have a doubt about the average to use: is it better to use the 
weighted average or the non-weighted average to compute the mean global 
temperature ?

Thanks for solving the problem,

Regards
Markus


>----Messaggio originale----
>Da: prasad.thoppil@xxxxxxxxxxxxxxx
>Data: 28/07/2011 17.23
>A: "markus.mingel@xxxxxxxxx"<markus.mingel@xxxxxxxxx>
>Ogg: Re: [ferret_users] Different results between ferret and other softwares
>
>Markus,
>
>My guess is that ferret computes the weighted average, while other 
>software not. For normal mean in Ferret try: 
>field[x=@sum,y=@sum]/field[x=@ngd,y=@ngd]
>
>On 07/28/11 04:41, markus.mingel@xxxxxxxxx wrote:
>> Dear Users,
>>
>> I got different results between ferret and matlab/idl/ncl when I compute 
the
>> global mean temperature from the CMIP5 models.
>>
>> Namely, taking the Canadian atmospheric model this is the result of the 
dump
>> for the temperature:
>>
>> 	float tas(time, lat, lon) ;
>> 		tas:standard_name = "air_temperature" ;
>> 		tas:long_name = "Near-Surface Air Temperature" ;
>> 		tas:units = "K" ;
>> 		tas:original_name = "ST" ;
>> 		tas:cell_methods = "time: mean (interval: 15 minutes)" ;
>> 		tas:cell_measures = "area: areacella" ;
>> 		tas:history = "2011-03-16T18:49:59Z altered by CMOR: Treated scalar
>> dimension: \'height\'. 2011-03-16T18:49:59Z altered by CMOR: replaced 
missing
>> value flag (1e+38) with standard missing value (1e+20)." ;
>> 		tas:coordinates = "height" ;
>> 		tas:missing_value = 1.e+20f ;
>> 		tas:_FillValue = 1.e+20f ;
>> 		tas:associated_files = "baseURL: http://cmip-pcmdi.llnl.
>> gov/CMIP5/dataLocation gridspecFile:
>> gridspec_atmos_fx_CanESM2_historical_r0i0p0.nc areacella:
>> areacella_fx_CanESM2_historical_r0i0p0.nc" ;
>>
>>
>> To compute the mean global temperature of the first month of data with 
ferret
>> I use the following command:
>>
>> list tas[i=@ave,j=@ave,l=1]
>>               VARIABLE : Near-Surface Air Temperature (K)
>>               DATA SET : CanESM2 model output prepared for CMIP5 historical
>>               FILENAME : tas_Amon_CanESM2_historical_r1i1p1_185001-200512.
nc
>>               LONGITUDE: 1.4W(-1.4) to 1.4W(358.6) (XY ave)
>>               LATITUDE : 90S to 90N (XY ave)
>>               TIME     : 16-JAN-1850 12:00 NOLEAP
>>               284.8
>>
>>
>> Now I expect having the same value (284.8) in matlab/IDL/NCL; indeed with 
all
>> these other 3 softwares I get the same value (275.13). Why???
>>
>> Am I wrong reading the data with matlab/IDL/NCL? Since there aren't any
>> scale_factor or add_offset values to read, in matlab/IDL/NCL I just read 
the
>> value tas. As example, these are the matlab lines I used to compute the 
global
>> mean:
>>
>> input_nc = netcdf('tas_Amon_CanESM2_historical_r1i1p1_185001-200512.nc');
>> tas          = input_nc{'tas'}(:) ;
>> tas          = squeeze(tas(1,:,:));
>> mean2(tas)
>>
>> ans =
>>
>>    275.1371
>>
>>
>> Do anyone could explain me why I get this difference in the mean values?
>>
>> Thanks into advance for help
>> Markus
>




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

Privacy Policy | Disclaimer | Accessibility Statement