cdo div corrupting data?
Added by Richard Hall almost 11 years ago
I have 2 datasets , 4 levels of atmosphere, gridded for a region, over 30 years. I need to divide one by the other. One is basically v wind squared, the other is u wind squared plus v wind squared. This gives the v wind as a proportion of the overall wind. Both datasets seem fine when plotted up but on using cdo div, some days get corrupted it seems, with negative values and values greater than one (not possible). The majority of days seem ok. Often it is just one atmospehric level for a day that seems to be a problem. ANy thoughts?
Richard Hall
Replies (4)
RE: cdo div corrupting data? - Added by Uwe Schulzweida almost 11 years ago
Hi Richard,
We can't reproduce this problem. Could you please attach you data files?
Cheers,
Uwe
RE: cdo div corrupting data? - Added by Richard Hall almost 11 years ago
I have tried to attach but they exceed the file size. Is there another way I can send them?
Richard
RE: cdo div corrupting data? - Added by Uwe Schulzweida almost 11 years ago
Please use our ftp server: ftp.zmaw.de
RE: cdo div corrupting data? - Added by Uwe Schulzweida almost 11 years ago
Hi Richard,
Thanks for your data files! The CDO result with div seems to be correct.
The problem is the used data format. GRIB format should only be used to store forecast weather data.
GRIB is using a lossy compression algorithm. How many information will be lost depends on the
number of bits use.
Your GRIB files are using max. 10 bits per value. It's not possible to get exact results in calculation
with such inaccurate data.
It's not a good idea to use GRIB output format to store the result of calculation. If you need GRIB format
then you should use as much bits as possible. Minimum 16 bits, better 24 bits per value.
You have to recalculate the files v_vabs and usqvsq, and store the result in netCDF or 24 bit GRIB format:
24 bit GRIB: cdo -f grb -b 24 ...... 1979-2010_v_vabs.grib cdo -f grb -b 24 ...... 1979-2010_usqvsq.grib netCDF: cdo -f nc ...... 1979-2010_v_vabs.nc cdo -f nc ...... 1979-2010_usqvsq.nc
Best wishes,
Uwe