Commit 3f7f0362 authored by Fabian Wachsmann's avatar Fabian Wachsmann
Browse files

Tried to consider strcit alias rule warning about missing value

parent 11834ef7
......@@ -4237,7 +4237,9 @@ register_variable(list_t *kvl, int vlistID, int varID, int *axis_ids, struct map
if (Options::cdoVerbose) cdoPrint("8.5.1. Successfully retrieved 'positive': '%s' and 'units' : '%s'.", positive, units);
if ( strcmp(units, "") == 0 )
cdoAbort("ERROR (infile: '%s')! No units found for CMOR variable '%s'.", cdoGetStreamName(0), name);
char missing_value[sizeof(double)];
/* char missing_value[sizeof(double)]; */
double missing_value[1];
missing_value[0] = vlistInqVarMissval(vlistID, varID);
double tolerance = 1e-4;
size_t gridsize = vlistGridsizeMax(vlistID);
int zsize = zaxisInqSize(vlistInqVarZaxis(vlistID, varID));
......@@ -4249,18 +4251,18 @@ register_variable(list_t *kvl, int vlistID, int varID, int *axis_ids, struct map
if ( vlistInqVarDatatype(vlistID, varID) == CDI_DATATYPE_FLT32 )
{
var->datatype = 'f';
*(float *) missing_value = vlistInqVarMissval(vlistID, varID);
/* *(float *) missing_value = vlistInqVarMissval(vlistID, varID); */
var->data = Malloc(gridsize * zsize * sizeof(float));
}
else
{
var->datatype = 'd';
*(double *) missing_value = vlistInqVarMissval(vlistID, varID);
/* *(double *) missing_value = vlistInqVarMissval(vlistID, varID); */
var->data = Malloc(gridsize * zsize * sizeof(double));
}
}
else
*(double *) missing_value = vlistInqVarMissval(vlistID, varID);
/* else
*(double *) missing_value = vlistInqVarMissval(vlistID, varID); */
if (Options::cdoVerbose) cdoPrint("8.5.2. Start to call cmor_variable.");
if (grid_ids[0] != 0)
{
......@@ -4796,7 +4798,6 @@ get_time_bounds(list_t *kvl, int taxisID, int ifreq, juldate_t ref_date, juldate
if (!taxisHasBounds(taxisID) || strcmp(kv_get_a_val(kvl, "ta", "n"), "cmip") == 0
|| time_axis == 2 || ifreq == 8 )
{
if (Options::cdoVerbose) cdoPrint("10.4. Time bounds are created for frequency '%d'.", ifreq);
vtime0b = 0;
vtime1b = 0;
......@@ -5914,7 +5915,6 @@ read_maptab(list_t *kvl, int streamID, char *miptabfreq, struct mapping vars[])
keyValues_t *kvn = kvlist_search(kvl, "n");
keyValues_t *kvc = kvlist_search(kvl, "c");
keyValues_t *kvcn = kvlist_search(kvl, "cn");
int byteorder;
int filetype = pstreamInqFiletype(cdoStreamOpenRead(cdoStreamName(0)));
if (maptab && maptabdir)
......
Markdown is supported
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