Project

General

Profile

Subtraction of datasets

Added by Shreya Bhowmick over 2 years ago

I have execute the following code for the temp.nc file. I should get the output for all timesteps but I get it for only 1 timestep. I am using cdo 1.9.9. I have attached a subset of the temp.nc file below.

cdo -sub -sellevel,500 -selyear,1982 temp.nc -sellevel,850 -selyear,1982 temp.nc sub.nc
cdo(1) sellevel: Process started
cdo(2) selyear: Process started
cdo(3) sellevel: Process started
cdo(4) selyear: Process started
cdo sub (Warning): Input parameters have different levels!
cdo sub (Warning): Some data values (min=-402414 max=-386595) are outside the
valid range (-32768 - 32767) of the used output precision!
Use the CDO option -b F32 or -b F64 to increase the output precision.
cdf_put_vara_double: name=t type=NC_SHORT minval=-402414.000000 maxval=-386595.000000

Error (cdf_put_vara_double): NetCDF: Numeric conversion not representable

cdo showdate sub.nc
1982-05-01
cdo showdate: Processed 2 variables over 1 timestep [0.00s 20MB].
tmp.nc (6.87 MB) tmp.nc

Replies (2)

RE: Subtraction of datasets - Added by Karin Meier-Fleischer over 2 years ago

Please, do not open multiple threads for more or less the same question. See https://code.mpimet.mpg.de/boards/2/topics/12326

CDO tells you exactly what the warning means, the values are not in a valid range and points to the option -b F32 or -b F64. You can use the -b F64 to use double precision.

RE: Subtraction of datasets - Added by Shreya Bhowmick over 2 years ago

Sorry. I will keep this in mind.

    (1-2/2)