CDO mergetime
Added by Anatoliy Z almost 4 years ago
Hello everybody!
I execute the command cdo mergetime
"cdo mergetime *.nc out.nc "
I combine 47 .nc files with a total size of 1 GB. But the resulting file out.nc is 20 GB or more. What am I doing wrong?
The files are daily data of one month in size.
Thanks in advance
Anatoliy
Replies (9)
RE: CDO mergetime - Added by Jonghun Jin almost 4 years ago
Is the output precision changed?
I don't know a CDO operator which shows the precision of values.
But you can simply test using "cdo -b {precision} copy out.nc out2.nc" to find the precision of out.nc by comparing file sizes between out.nc and out2.nc.
Details about '-b' option are in CDO user guide.
Best regards,
Jonghun
Anatoliy Z wrote:
Hello everybody!
I execute the command cdo mergetime
"cdo mergetime *.nc out.nc "
I combine 47 .nc files with a total size of 1 GB. But the resulting file out.nc is 20 GB or more. What am I doing wrong?
The files are daily data of one month in size.Thanks in advance
Anatoliy
RE: CDO mergetime - Added by Anatoliy Z almost 4 years ago
OK thanks. I tried NCO - everything turned out as I would like. NCO "ate" even files with a non-standard coordinate format, about which the CDO complained.
regards
Anatoliy
RE: CDO mergetime - Added by Karin Meier-Fleischer almost 4 years ago
Hi Anatoliy,
I guess that your files are not CF convention conform, but without any file it is not possible to help.
@Jonghun: you can use the sinfon operator to see the dtype of a variable.
-Karin
RE: CDO mergetime - Added by Anatoliy Z almost 4 years ago
Karin, thanks for the answer. The files were taken here https://cds.climate.copernicus.eu/cdsapp#!/dataset/sis-agrometeorological-indicators?tab=overview.
regards,
Anatoliy
RE: CDO mergetime - Added by Karin Meier-Fleischer almost 4 years ago
What did you exactly choose (variable etc)?
RE: CDO mergetime - Added by Anatoliy Z almost 4 years ago
2005-2020 year, three months - December, January, February
RE: CDO mergetime - Added by Karin Meier-Fleischer almost 4 years ago
The input files are netcdf4 compressed files.
cdo sinfon Snow-Thickness-LWE-Mean_C3S-glob-agric_AgERA5_daily_20050101-20050131_final-v1.0.nc File format : NetCDF4 zip -1 : Institut Source T Steptype Levels Num Points Num Dtype : Parameter name 1 : unknown unknown v instant 1 1 6483600 1 F32z : Snow_Thickness_LWE_Mean Grid coordinates : 1 : lonlat : points=6483600 (3600x1801) lon : -180 to 179.9 by 0.1 degrees_east circular lat : 90 to -90 by -0.1 degrees_north Vertical coordinates : 1 : surface : levels=1 Time coordinate : 31 steps RefTime = 1900-01-01 00:00:00 Units = days Calendar = proleptic_gregorian YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss 2005-01-01 00:00:00 2005-01-02 00:00:00 2005-01-03 00:00:00 2005-01-04 00:00:00 2005-01-05 00:00:00 2005-01-06 00:00:00 2005-01-07 00:00:00 2005-01-08 00:00:00 2005-01-09 00:00:00 2005-01-10 00:00:00 2005-01-11 00:00:00 2005-01-12 00:00:00 2005-01-13 00:00:00 2005-01-14 00:00:00 2005-01-15 00:00:00 2005-01-16 00:00:00 2005-01-17 00:00:00 2005-01-18 00:00:00 2005-01-19 00:00:00 2005-01-20 00:00:00 2005-01-21 00:00:00 2005-01-22 00:00:00 2005-01-23 00:00:00 2005-01-24 00:00:00 2005-01-25 00:00:00 2005-01-26 00:00:00 2005-01-27 00:00:00 2005-01-28 00:00:00 2005-01-29 00:00:00 2005-01-30 00:00:00 2005-01-31 00:00:00
When the files are read, they are uncompressed and saved as uncompressed data when merged.
You can reduce the size of the merged file using the '-z' option with compression level 1-9,
but this will take some time.
cdo -O -z zip_9 -mergetime Snow-Thickness-LWE-Mean_C3S-glob-agric_AgERA5_daily_*.nc outfile.nc