Hi Markus, This is a huge difference in value (285 versus 275) -- not something attributable to round off errors. It's as if the calculations are using data from a different vertical level? Or averaging missing value points in as zero values? Or something of that nature. One difference that seems apparent: this matlab calculation is a simple arithmetic mean of the non-missing values, whereas the Ferret calculation oftas = input_nc{'tas'}(:) ; tas = squeeze(tas(1,:,:)); mean2(tas) is an area-weighted average.tas[i=@ave,j=@ave,l=1] - Steve =================================================================== On 7/28/2011 2:41 AM, 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 |