Project

General

Profile

Using muldpm multiplies data by number of days in a year (e.g. 360 or 365) instead of days in a month

Added by H. ES over 2 years ago

Hello,
I have installed cdo with the following libraries:

CDI library version : 2.0.0rc5
cgribex library version : 2.0.0
ecCodes library version : 2.23.0
NetCDF library version : 4.8.0 of May 6 2021 22:46:38 $
hdf5 library version : 1.10.7
exse library version : 1.4.2
FILE library version : 1.9.1

I have a netcdf file with monthly time series data. I want to multiply the data by the number of days in the month.

For example using the attached netcdf file I run the command:

cdo -L -muldpm pr_Amon_HadGEM3-GC31-LL_hist-1950_r1i1p1f1_gn_195001-195012.nc muldpm_example.nc

Upon inspecting the output file (muldpm_example.nc), I find that instead of each data point being multiplied by the number of days in the month (e.g. 30, 31, 29, 28, etc.), every data point is multiplied by 360.

I also find that if instead of -muldpm I use -muldpy I get the same result (every data point multiplied by 360). It appears that muldpm and muldpy are doing the same thing. Is this some bug or is there some detail I'm missing?

Attached is the netcdf file that I want to process.

Best Regards


Replies (2)

RE: Using muldpm multiplies data by number of days in a year (e.g. 360 or 365) instead of days in a month - Added by H. ES over 2 years ago

I re-ran the command using verbose output (-v) to try to get more information and I received the following output:

Command:
cdo -L -v -muldpm pr_Amon_HadGEM3-GC31-LL_hist-1950_r1i1p1f1_gn_195001-195012.nc muldpm_example.nc

Result:
cdo muldpm: calendar 3 year 1950 month 1 result 360
cdo muldpm: calendar 3 year 1950 month 2 result 360
cdo muldpm: calendar 3 year 1950 month 3 result 360
cdo muldpm: calendar 3 year 1950 month 4 result 360
cdo muldpm: calendar 3 year 1950 month 5 result 360
cdo muldpm: calendar 3 year 1950 month 6 result 360
cdo muldpm: calendar 3 year 1950 month 7 result 360
cdo muldpm: calendar 3 year 1950 month 8 result 360
cdo muldpm: calendar 3 year 1950 month 9 result 360
cdo muldpm: calendar 3 year 1950 month 10 result 360
cdo muldpm: calendar 3 year 1950 month 11 result 360
cdo muldpm: calendar 3 year 1950 month 12 result 360
cdo muldpm: Processed 331776 values from 1 variable over 12 timesteps [0.04s 20MB].

So cdo recognizes the year and the month, but the result of muldpm is still 360

I ran the same command using muldpy instead and I get the same result:

cdo muldpy: calendar 3 year 1950 month 1 result 360
cdo muldpy: calendar 3 year 1950 month 2 result 360
cdo muldpy: calendar 3 year 1950 month 3 result 360
cdo muldpy: calendar 3 year 1950 month 4 result 360
cdo muldpy: calendar 3 year 1950 month 5 result 360
cdo muldpy: calendar 3 year 1950 month 6 result 360
cdo muldpy: calendar 3 year 1950 month 7 result 360
cdo muldpy: calendar 3 year 1950 month 8 result 360
cdo muldpy: calendar 3 year 1950 month 9 result 360
cdo muldpy: calendar 3 year 1950 month 10 result 360
cdo muldpy: calendar 3 year 1950 month 11 result 360
cdo muldpy: calendar 3 year 1950 month 12 result 360
cdo muldpy: Processed 331776 values from 1 variable over 12 timesteps [0.04s 20MB].

RE: Using muldpm multiplies data by number of days in a year (e.g. 360 or 365) instead of days in a month - Added by Uwe Schulzweida over 2 years ago

Thanks for the bug report! In CDO version 2.0.0 a pointer was moved by mistake. muldpm returns the result of muldpy. The problem will be fixed in the next version 2.0.3.

Cheers,
Uwe

    (1-2/2)