Skip to content
Snippets Groups Projects
Commit 17622be8 authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

Replace magic number with commented symbolic constant.

parent 7064bb85
No related branches found
No related tags found
No related merge requests found
......@@ -277,7 +277,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
gatherRedistSet: ;
}
#endif
varDesc[varIdx].code = 129 + (int)varIdx;
varDesc[varIdx].code = GRIB_USERDEF + (int)varIdx;
vlistDefVarCode(vlistID, varDesc[varIdx].id, varDesc[varIdx].code);
vlistDefVarDatatype(vlistID, varDesc[varIdx].id, setup.datatype);
}
......
......@@ -194,7 +194,7 @@ modelRun(struct model_config setup, MPI_Comm comm)
varDesc[varIdx].partDesc = idxlist;
}
#endif
varDesc[varIdx].code = 129 + (int)varIdx;
varDesc[varIdx].code = GRIB_USERDEF + (int)varIdx;
vlistDefVarCode(vlistID, varDesc[varIdx].id, varDesc[varIdx].code);
vlistDefVarDatatype(vlistID, varDesc[varIdx].id, setup.datatype);
}
......
......@@ -9,6 +9,12 @@
#include <math.h>
#include <time.h>
enum {
/* 129 is the first user-defined code of the GRIB format */
GRIB_USERDEF = 129,
};
void
var_scale(int datatype, double *mscale, double *mrscale);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment