Project

General

Profile

Cooling degree days

Added by Guilong Li over 10 years ago

Hi,

CDO has a function to calculate heating degree days. Now I want to calculate cooling degree days. Because CDO doesn't have this function, I do some changes for the data in order to use eca_hd to calculate the cooling degree days.

First, I reverse the data using cdo expr,'tmean=(18-tmean+273.15)' tmean.nc tmean1.nc to reverse the temperature and change Celsius to Kelvin, then I use cdo eca_hd,0 tmean1.nc cdd.nc, here I use 18C as a threshold.

But I get a lot of negative value in cdd.nc, I don't know why.

Can someone tell me where I did wrong?

Thanks,

Guilong


Replies (1)

RE: Cooling degree days - Added by Guillaume Mauger almost 9 years ago

Hi Guilong,

I found your post in trying to calculate cooling degree days myself, and have found the same error. This seems to be a bug in the CDO command "_expr_" (at least when it comes to netcdf4 files -- I haven't tested this with netcdf3 files).

If I instead use the NCO command: "_ncap2 -s 'tmean=(18-tmean+273.15)' tmean.nc tmean1.nc_", then I get the correct answer.

I like your approach better than the alternative presented here -- [[https://code.zmaw.de/boards/1/topics/446]] -- which in my opinion is more convoluted.

Cheers,
Guillaume

    (1-1/1)