Project

General

Profile

chname does not change the name of the variable

Added by Nikolay Yasinskiy over 5 years ago

I have a file with var182, want to change this name to var777 or other.
cdo chname,var182,var777 outputf.grb outputf1.grb does not change it.
It is still var182. Where is the problem?

And please answer my qiestion about ECMWF remapping. This problem concerns the model grid, but I don't know if there are some commands to operate files like this (ECMWF). It seems that this model has latlong grid, but produced from gauss grid, may be it is the cause of inconsistency.


Replies (1)

RE: chname does not change the name of the variable - Added by Uwe Schulzweida over 5 years ago

The problem is that the name is not stored in the GRIB file. The GRIB file contains only code and table numbers for each parameter. An application like CDO has to search for the code number in the table to find the name of the parameter. If the parameter table is not available then CDO generates a temporary name from the code name. A parameter with the code number 182 will get the name var182.
To make it short, with GRIB files you have to change the code number instead of the name:

cdo chcode,182,177 infile outfile
GRIB is a very compact format. Therefor it has only one byte reserved for the code number. That means the allowed range is 1 to 255.

    (1-1/1)