Commit 34b70503 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

setpartab: variable name does not change [Bug #7681].

parent e1b3ea5e
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
2017-04-21 Uwe Schulzweida 2017-04-21 Uwe Schulzweida
* cmorlite: skipped empty key values * setpartab: variable name does not change [Bug #7681]
* cmorlite: skipped empty key values [Bug #7681]
2017-04-14 Uwe Schulzweida 2017-04-14 Uwe Schulzweida
......
...@@ -121,7 +121,7 @@ void apply_parameterlist(pt_mode_t ptmode, list_t *pmlist, int nvars, int vlistI ...@@ -121,7 +121,7 @@ void apply_parameterlist(pt_mode_t ptmode, list_t *pmlist, int nvars, int vlistI
list_t *kvlist = NULL; list_t *kvlist = NULL;
if ( ptmode == CODE_NUMBER ) if ( ptmode == CODE_NUMBER )
{ {
codenum = vlistInqVarCode(vlistID2, varID); codenum = vlistInqVarCode(vlistID2, varID);
snprintf(valstr, sizeof(valstr), "%d", codenum); snprintf(valstr, sizeof(valstr), "%d", codenum);
kvlist = pmlist_search_kvlist_ventry(pmlist, "code", valstr, nventry, ventry); kvlist = pmlist_search_kvlist_ventry(pmlist, "code", valstr, nventry, ventry);
if ( kvlist ) if ( kvlist )
...@@ -176,7 +176,7 @@ void apply_parameterlist(pt_mode_t ptmode, list_t *pmlist, int nvars, int vlistI ...@@ -176,7 +176,7 @@ void apply_parameterlist(pt_mode_t ptmode, list_t *pmlist, int nvars, int vlistI
if ( lv1 && STR_IS_EQ(key, "standard_name") ) vlistDefVarStdname(vlistID2, varID, value); if ( lv1 && STR_IS_EQ(key, "standard_name") ) vlistDefVarStdname(vlistID2, varID, value);
else if ( lv1 && STR_IS_EQ(key, "long_name") ) vlistDefVarLongname(vlistID2, varID, value); else if ( lv1 && STR_IS_EQ(key, "long_name") ) vlistDefVarLongname(vlistID2, varID, value);
else if ( lv1 && STR_IS_EQ(key, "units") ) cdo_define_var_units(var, vlistID2, varID, value); else if ( lv1 && STR_IS_EQ(key, "units") ) cdo_define_var_units(var, vlistID2, varID, value);
else if ( lv1 && STR_IS_EQ(key, "name") ) /*vlistDefVarName(vlistID2, varID, parameter2word(value))*/; else if ( lv1 && STR_IS_EQ(key, "name") && ptmode != VARIABLE_NAME ) vlistDefVarName(vlistID2, varID, parameter2word(value));
else if ( lv1 && STR_IS_EQ(key, "out_name") ) else if ( lv1 && STR_IS_EQ(key, "out_name") )
{ {
const char *outname = parameter2word(value); const char *outname = parameter2word(value);
...@@ -352,6 +352,8 @@ void *Setpartab(void *argument) ...@@ -352,6 +352,8 @@ void *Setpartab(void *argument)
tableformat = 1; tableformat = 1;
} }
if ( cdoVerbose ) cdoPrint("Table format version %d", tableformat);
int streamID1 = streamOpenRead(cdoStreamName(0)); int streamID1 = streamOpenRead(cdoStreamName(0));
int vlistID1 = streamInqVlist(streamID1); int vlistID1 = streamInqVlist(streamID1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment