Project

General

Profile

mergetime, cat, or copy?

Added by Joseph S almost 5 years ago

Greetings:

I am attempting to merge two ERA5 nc2 files with identical grids and variables. The first file contains a single variable for the months of April, May, and June from 1979 to 2018. The second file contains the same single variable as the first file, but only for the month of April in 2019.

Is it best to use mergetime, cat, or copy in this case? I attempted to use cat and copy, but received errors, as shown below.

"Error (cdf_put_vara_double) : NetCDF: Numeric conversion not representable".

When using cat and copy, I also tried the -b F64 and -b I32 extensions (the files are explicitly I32), yet the same errors resulted.

Mergetime succeeded, but the file is slightly larger than expected, and when I attempt to use cdo sinfo on the newly merged file, it takes a very long time to process, as compared to similar files.

The sinfor output files for the two nc2 files that I am attempting to merge (or concatenate or copy together) are attached.

I searched through the cdo wiki and did not notice a similar issue to this one. I would appreciate any advice.

Thanks kindly,
Joseph


Replies (2)

RE: mergetime, cat, or copy? - Added by Joseph S almost 5 years ago

Some additional information regarding the issue I previously described:

Running the following command:

$ cdo -b F64 -cat 2.nc mean_wind_wave_period_2.nc

yields this error message:

cdo cat: 0%cdf_put_var1_double: ncid = 131072 varid = 2 val = 1045296.000000
Error (cdf_put_var1_double): NetCDF: Index exceeds dimension bound

I think that cat fails because of the discontintinuous time series.

For example, the file mean_wind_wave_period_2.nc is the larger file that I want to extend. It contains a single variable for the following time series:

1979 April, May, June
1980 April, May, June
1981 April, May, June
[...]
2016 April, May, June
2017 April, May, June
2018 April, May, June

The file 2.nc is a new file that I want to append to the first file (described above). The new file, 2.nc, contains the same single variable as the first file, but for the following time series (only one month):

2019 April

I suspect that the cdo cat command fails because I am attempting to extend 2018 April, May, June by using 2019 April, rather than 2018 July. Is my assumption correct? Is cdo cat only usable if the time series is continuous?

If so, what is the best way to extend datasets, which share a single variable and the same grid, when the data sets are grouped by discountinuous quarters?

Thanks kindly,
Joseph

RE: mergetime, cat, or copy? - Added by Karin Meier-Fleischer almost 5 years ago

Hi Joseph,

without the data, it's hard to say what's going on. I'm not sure but I would use mergetime.

-Karin

    (1-2/2)