Project

General

Profile

cdo ensmean producing different results

Added by Lyndon Mark Olaguera over 7 years ago

Dear All,

I have netcdf files from 1975 to 1992 with missing 1978 (pentad_anom_1975.nc to pentad_anom_1992.nc). There are 73 time steps in each file (pentads).
Here's the link of the data: https://drive.google.com/drive/folders/0B9faET7Bc2o8MmtGS2VJLTB2NE0?usp=sharing
I would like to calculate the average for 17 years.

I tried the following methods:
Method 1
cdo ensmean pentad_anom_1975.nc pentad_anom_1976.nc pentad_anom_1977.nc TEST1.nc
cdo ensmean pentad_anom_1979.nc pentad_anom_1980.nc pentad_anom_1981.nc pentad_anom_1982.nc pentad_anom_1983.nc pentad_anom_1984.nc pentad_anom_1985.nc pentad_anom_1986.nc pentad_anom_1987.nc pentad_anom_1988.nc pentad_anom_1989.nc pentad_anom_1990.nc pentad_anom_1991.nc pentad_anom_1992.nc TEST2.nc
cdo ensmean TEST1.nc TEST2.nc TEST3.nc

Method 2
cdo ensmean pentad_anom_1975.nc pentad_anom_1976.nc pentad_anom_1977.nc pentad_anom_1979.nc pentad_anom_1980.nc pentad_anom_1981.nc pentad_anom_1982.nc pentad_anom_1983.nc pentad_anom_1984.nc pentad_anom_1985.nc pentad_anom_1986.nc pentad_anom_1987.nc pentad_anom_1988.nc pentad_anom_1989.nc pentad_anom_1990.nc pentad_anom_1991.nc pentad_anom_1992.nc TEST3_v2.nc

Question:
The results for the two methods are different. I dont know why. Does this mean that cdo also follows the sequence of the record time dimension? The second method does not produce reasonable results.

I'll appreciate any help.


Replies (1)

RE: cdo ensmean producing different results - Added by Uwe Schulzweida over 7 years ago

I rechecked the operator ensmean (CDO version 1.7.2) with your data. The result of ensmean is correct, also if it looks unreasonable for some timesteps of your data!
Method 1 is mathematical different from Method 2.

    (1-1/1)