Project

General

Profile

Monthly anomalies with ymonsub do not average to 0

Added by Alejandro Ludert over 10 years ago

Dear CDO community:

I have run into some unexpected issues using CDO to calculate monthly anomalies

The problem is as follows:

I calculate the monthly anomalies using CDO => cdo ymonsub infile.nc −ymonavg infile.nc outfile.nc

For my particular analysis, I need independent time series of the anomaly maps for each month. I do this using ferret, defining a variable for september for example as let uwnd_s = uwnd[k=7,l=9:777:12] and saiving it to a new .nc file. This new variable should represent only the anomaly maps for september at the 850mb level. This new variable has 65 time steps all labeled as sep 1 of every year.

The problem is that the time average of this new variable uwnd_s does not average out to 0 as I would expect the time average of the anomaly maps should. This time average is represented as the upper right and lower right panels on the figure I attached.

On the other hand when I average out in time the complete anomaly time series as CDO produces it using shade uwnd[k=7,l=@ave] this does average out to 0 as expected (this is the lower left panel pof the figure I attached). This suggests that the cdo ymonsub infile.nc −ymonavg infile.nc outfile.nc comand is not calculating the monthly anomalies as a monthly value minus the average value of that particular month (Jan(year 1) - Avg(all Jan)), but as a monthly value minus the average of all months.

Thank you all for your patience and help in advance. Alejandro Ludert.

I am using NCEP u-wind data (data downloaded from http://www.esrl.noaa.gov/psd/data/gridded/).

23_AM.png (156 KB) 23_AM.png

Replies (2)

RE: Monthly anomalies with ymonsub do not average to 0 - Added by Jaison-Thomas Ambadan over 10 years ago

Hi,

try using ymonmean instead of ymonavg. CDO treats "mean" and "average" slightly different. Please have a look at CDO documentation section 1.7.1 https://code.zmaw.de/embedded/cdo/1.5.9/cdo.html#x1-290001.7.1

try also with higher precision like: cdo -b F64 -ymonsub ifile.nc -ymonmean ifile.nc ofile.nc

My results with: cdo -b F64 outputf,%64.32f,1 -fldmean -timmean -ymonsub ifile.nc -ymonmean ifile.nc

0.00000000000000006349404213138042

which is close to zero!

Cheers,
J

RE: Monthly anomalies with ymonsub do not average to 0 - Added by Torben Mueller over 10 years ago

Dear Jaison-Thomas,

Will the command ' cdo ymonsub infile.nc −ymonmean infile.nc outfile.nc' uncommon time axis conventions correctly?

E.g. files in which each monthly average is defined by the 1st of each following month?

Thanks

    (1-2/2)