-1

I'm using a simple nco command on a file with monthly ocean data to calculate annual averages. I perform the same command twice, on two files with identical formatting and output, one contains 1000 years of data, the other has 750 years. I cannot see anything else that is different about the files. The following command works for the first (1000 year file), but not for the second. In the first case it creates annual averages, with 1000 times. This is what I expected.

ncra --mro -O -d time,,,12,12 TEMP_000101-100012.nc TEMP_annual_1000yr_TEST.nc

However, when I try this same command for the shorter record file I get only one entry, exactly in the middle of the time frame (the file goes from year 1000 to 1750, and the resulting file creates output for the year 1375).

To be clear, the second command is:

ncra --mro -O -d time,,,12,12 TEMP_100101-174912.nc TEST.nc

Does anyone have thoughts on why this might be?

Thanks in advance, mira

  • any chance to make the input files available to check? what do you get on the second file if you try "cdo showdate TEMP_100101-174912.nc" or "ncdump -h TEMP_100101-174912.nc"? – ClimateUnboxed Sep 27 '21 at 04:12
  • I opened a bug ticket (https://sourceforge.net/p/nco/bugs/125/), but have dropped the ball on hyperslabbing the input files so they are small enough to send. I did find that if I first concatenate the files and then try the ncra command, it works, which is strange. – user14771692 Sep 29 '21 at 22:31
  • In response to your specific queries: cdo showdate TEMP_100101-174912.nc Warning (cdfCheckVars): Unsupported data type (char/string), skipped variable moc_components! Warning (cdfCheckVars): Unsupported data type (char/string), skipped variable transport_components! Warning (cdfCheckVars): Unsupported data type (char/string), skipped variable transport_regions! Warning (cdfInqContents): Coordinates variable z_t can't be assigned! 1001-02-01 1001-03-01 1001-04-01 1001-05-01 ... – user14771692 Sep 29 '21 at 22:31
  • And also: ncdump -h TEMP_100101-174912.nc | less netcdf TEMP_100101-174912 { dimensions: moc_comp = 3 ; nchar = 384 ; transport_comp = 5 ; transport_reg = 2 ; z_t = 60 ; z_t_150m = 15 ; z_w = 60 ; z_w_top = 60 ; z_w_bot = 60 ; lat_aux_grid = 395 ; moc_z = 61 ; nlat = 384 ; nlon = 320 ; time = UNLIMITED ; // (9000 currently) d2 = 2 ; – user14771692 Sep 29 '21 at 22:32

1 Answers1

0

Your commands appear to be correct, and that behavior is inexplicable. There is either something strange in your 750 file or you have stumbled upon a bug. Please submit this as an NCO issue as described here.

Charlie Zender
  • 5,929
  • 14
  • 19