0

I am trying to execute the command

cdo subc,SCM5_His_mean.nc ob_MAMJ_mean.nc SCM5_His_mb.nc

but I'm getting this error:

cdo subc (Abort): Float parameter >SCM5_His_MAMJ_mean.nc< contains invalid character at position 1!

The SCM5_His_MAMJ_mean.nc file was originally in curvillinear grid format and was interpolated to regular grid using remapbil in cdo. Where could be the problem as the interpolation returned satisfactory results?

ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86

1 Answers1

0

The command subc mean "subtract a constant" and needs a float or integer argument after it, e.g. the following command would subtract 273.15 from the field contained in temp_in_K.nc and put the result in the output file temp_in_C.nc (note that the meta data is not changed, however):

cdo subc,273.15 temp_in_K.nc temp_in_C.nc 

If you want to subtract the field in SCM5_His_mean.nc from the field in ob_MAMJ_mean.nc, then the correct command is sub

cdo sub file1.nc file2.nc file1-file2.nc 

the last name is the output

ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86