0

I am trying to merge the following files in cdo: 1979-1982.nc 1983-1995.nc 1996-2008.nc 2009-2021.nc that each contain one variable (the same in all files). I use the code: cdo mergetime *.nc merged_file.nc but I get the error: NetCDF: Numeric conversion not representable. Any idea?

los
  • 1
  • 1

1 Answers1

0

Does this post help?

In their case it was the presence of "inf" that caused issues.

they suggest resolving this with

cdo setctomiss,inf

As Robert says in his comment, packing can cause issues, try also adding the option

-b f32 
ClimateUnboxed
  • 7,106
  • 3
  • 41
  • 86
  • Also possible it's caused by the raw data being packed: https://code.mpimet.mpg.de/projects/cdo/wiki/Cdo#netCDF-with-packed-data. By coincidence I'm trying to solve the exact same error, but there is no clear cause of the error.... – Robert Wilson Jun 27 '22 at 08:45
  • Yes, try converting to float. I usually find I have to do that when combining packed data files in any way – ClimateUnboxed Jun 27 '22 at 09:06
  • They are means sea level pressure data from ERA5 for the whole North Atlantic. – los Jun 27 '22 at 09:21
  • Then almost certain that Robert is right, very likely packing. Will update my answer but should actually be Robert that gets the credit – ClimateUnboxed Jun 27 '22 at 09:23
  • 1
    Most of the ERA5 data I have dealt with is stored as integer with an offset, so you probably want to convert to float "cdo -b F64 -mergetime infile outfile". I was working with ERA5 shortwave radiation recently and had to do exactly this – Robert Wilson Jun 27 '22 at 09:24