Project

General

Profile

cdo copy vs cdo clone

Added by XR Chua over 1 year ago

Hi, I would like to use the compression options in cdo and am considering the following options:

cdo -f nc4c -z zip_9 copy original.nc compressed.nc

cdo -f nc4c -z zip_9 clone original.nc compressed.nc

I was looking at the v2.1.1 manual and see that
In contrast to the copy operator, clone tries not to
change the input data. GRIB records are neither decoded nor decompressed.

Does that mean the two are identifical for netcdf data?

Thanks.


Replies (4)

RE: cdo copy vs cdo clone - Added by Uwe Schulzweida over 1 year ago

Yes, for NetCDF data both are almost identical. NetCDF data is always decompressed in CDO.

RE: cdo copy vs cdo clone - Added by XR Chua over 1 year ago

Thanks Uwe, when you say "almost identical", do you mean that the differences only affect the metadata and not the data itself?

RE: cdo copy vs cdo clone - Added by Uwe Schulzweida over 1 year ago

clone copies the data directly in the I/O library and with copy the data is copied via CDO. So an additional copy of the data is necessary. The handling of the metadata is identical.

RE: cdo copy vs cdo clone - Added by XR Chua over 1 year ago

Ok, for netcdf data, which would we use if we wish to preserve the original data as much as possible? Or are both methods meant to be lossless?

    (1-4/4)