Project

General

Profile

Is variable order jas influence on mergetime?

Added by ziming li over 6 years ago

I has some grib1 files from ecmwf.
After selvar and sellonlatbox, the output nc files had same variables , but the order of variables are different. While I want to merge all the file together. cdo told me that files had different variables, I use the showname operator, they had same variables! what I want to know is the order of variables gad influence om mergetime?


Replies (7)

RE: Is variable order jas influence on mergetime? - Added by Karin Meier-Fleischer over 6 years ago

Hi Ziming,

without the complete error message and the ncdump outputs from your netCDF files it is hard to answer your question.

Please, send us the output of 'ncdump -h <file>' for each of your files trying to merge. And if possible, upload the files.

-Karin

RE: Is variable order jas influence on mergetime? - Added by ziming li over 6 years ago

Hi,
Thanks for your reply.
I selected two files to show the errors.
See the help.md for details.

Look forward to your help.

Ziming

RE: Is variable order jas influence on mergetime? - Added by Uwe Schulzweida over 6 years ago

CDO doesn't change the order of the variable names automatically. You can use the CDO option --sortname to sort the variables by name:

cdo --sortname copy C1D10291200102912011.nc  C1D10291200102915001.nc result

RE: Is variable order jas influence on mergetime? - Added by ziming li over 6 years ago

I'm not mean cdo change the order. What I want know is that why this error occured while merge the files.

RE: Is variable order jas influence on mergetime? - Added by Uwe Schulzweida over 6 years ago

The error occurs because of the different order of the variables.

RE: Is variable order jas influence on mergetime? - Added by ziming li over 6 years ago

So here comes the question: how to set the different file had same order of variables?;)

RE: Is variable order jas influence on mergetime? - Added by ziming li over 6 years ago

ziming li wrote:

So here comes the question: how to set the different file had same order of variables?;)

Soryy, I don't see that --sortname.

    (1-7/7)