Commit f6fccdec authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Merge branch 'test' into develop

parents 541a1d7f a9ea605e
libcdi @ 15e51519
Subproject commit 4114be8ac84dd4d7f7a60f5f9762ac95ed6381f3 Subproject commit 15e515199d6b5f13bf4669b730f676f346fcede1
...@@ -160,7 +160,7 @@ void *Adisit(void *argument) ...@@ -160,7 +160,7 @@ void *Adisit(void *argument)
int varID, levelID; int varID, levelID;
int offset; int offset;
int i; int i;
int nmiss; size_t nmiss;
int thoID = -1, saoID = -1; int thoID = -1, saoID = -1;
char varname[CDI_MAX_NAME], stdname[CDI_MAX_NAME]; char varname[CDI_MAX_NAME], stdname[CDI_MAX_NAME];
double pin = -1; double pin = -1;
......
...@@ -391,7 +391,7 @@ static ...@@ -391,7 +391,7 @@ static
void *after_readTimestep(void *arg) void *after_readTimestep(void *arg)
{ {
int varID, gridID, zaxisID, levelID, timeID; int varID, gridID, zaxisID, levelID, timeID;
int nmiss; size_t nmiss;
RARG *rarg = (RARG *) arg; RARG *rarg = (RARG *) arg;
int nrecs = rarg->nrecs; int nrecs = rarg->nrecs;
...@@ -1707,7 +1707,7 @@ void after_postcntl(struct Control *globs, struct Variable *vars) ...@@ -1707,7 +1707,7 @@ void after_postcntl(struct Control *globs, struct Variable *vars)
gridID = vars[code].igridID; gridID = vars[code].igridID;
zaxisID = vars[code].izaxisID; zaxisID = vars[code].izaxisID;
zaxisName(zaxisInqType(zaxisID), zaxistypename); zaxisName(zaxisInqType(zaxisID), zaxistypename);
fprintf(stderr," Detected Code %3d grid %-8s size %5d level %2d %-8s\n", fprintf(stderr," Detected Code %3d grid %-8s size %5zu level %2d %-8s\n",
code, gridNamePtr(gridInqType(gridID)), gridInqSize(gridID), code, gridNamePtr(gridInqType(gridID)), gridInqSize(gridID),
zaxisInqSize(zaxisID), zaxistypename); zaxisInqSize(zaxisID), zaxistypename);
} }
...@@ -1812,7 +1812,7 @@ void after_postcntl(struct Control *globs, struct Variable *vars) ...@@ -1812,7 +1812,7 @@ void after_postcntl(struct Control *globs, struct Variable *vars)
gridID = vars[code].ogridID; gridID = vars[code].ogridID;
zaxisID = vars[code].ozaxisID; zaxisID = vars[code].ozaxisID;
zaxisName(zaxisInqType(zaxisID), zaxistypename); zaxisName(zaxisInqType(zaxisID), zaxistypename);
fprintf(stderr," Selected Code %3d grid %-8s size %5d level %2d %-8s\n", fprintf(stderr," Selected Code %3d grid %-8s size %5zu level %2d %-8s\n",
code, gridNamePtr(gridInqType(gridID)), gridInqSize(gridID), code, gridNamePtr(gridInqType(gridID)), gridInqSize(gridID),
zaxisInqSize(zaxisID), zaxistypename); zaxisInqSize(zaxisID), zaxistypename);
} }
......
...@@ -37,13 +37,13 @@ void *Arith(void *argument) ...@@ -37,13 +37,13 @@ void *Arith(void *argument)
{ {
enum {FILL_NONE, FILL_TS, FILL_VAR, FILL_VARTS, FILL_FILE}; enum {FILL_NONE, FILL_TS, FILL_VAR, FILL_VARTS, FILL_FILE};
int filltype = FILL_NONE; int filltype = FILL_NONE;
int nmiss; size_t nmiss;
int nrecs, nvars = 0; int nrecs, nvars = 0;
int nlevels2 = 1; int nlevels2 = 1;
int varID, levelID; int varID, levelID;
int levelID2; int levelID2;
int *varnmiss2 = NULL; size_t *varnmiss2 = NULL;
int **varnmiss = NULL; size_t **varnmiss = NULL;
double *vardata2 = NULL; double *vardata2 = NULL;
double **vardata = NULL; double **vardata = NULL;
...@@ -152,7 +152,7 @@ void *Arith(void *argument) ...@@ -152,7 +152,7 @@ void *Arith(void *argument)
if ( filltype == FILL_VAR || filltype == FILL_VARTS ) if ( filltype == FILL_VAR || filltype == FILL_VARTS )
{ {
vardata2 = (double*) Malloc(gridsize*nlevels2*sizeof(double)); vardata2 = (double*) Malloc(gridsize*nlevels2*sizeof(double));
varnmiss2 = (int*) Malloc(nlevels2*sizeof(int)); varnmiss2 = (size_t*) Malloc(nlevels2*sizeof(size_t));
} }
if ( cdoVerbose ) cdoPrint("Number of timesteps: file1 %d, file2 %d", ntsteps1, ntsteps2); if ( cdoVerbose ) cdoPrint("Number of timesteps: file1 %d, file2 %d", ntsteps1, ntsteps2);
...@@ -181,13 +181,13 @@ void *Arith(void *argument) ...@@ -181,13 +181,13 @@ void *Arith(void *argument)
{ {
nvars = vlistNvars(vlistIDx2); nvars = vlistNvars(vlistIDx2);
vardata = (double **) Malloc(nvars*sizeof(double *)); vardata = (double **) Malloc(nvars*sizeof(double *));
varnmiss = (int **) Malloc(nvars*sizeof(int *)); varnmiss = (size_t **) Malloc(nvars*sizeof(size_t *));
for ( varID = 0; varID < nvars; varID++ ) for ( varID = 0; varID < nvars; varID++ )
{ {
int gridsize = gridInqSize(vlistInqVarGrid(vlistIDx2, varID)); int gridsize = gridInqSize(vlistInqVarGrid(vlistIDx2, varID));
int nlev = zaxisInqSize(vlistInqVarZaxis(vlistIDx2, varID)); int nlev = zaxisInqSize(vlistInqVarZaxis(vlistIDx2, varID));
vardata[varID] = (double*) Malloc(nlev*gridsize*sizeof(double)); vardata[varID] = (double*) Malloc(nlev*gridsize*sizeof(double));
varnmiss[varID] = (int*) Malloc(nlev*sizeof(int)); varnmiss[varID] = (size_t*) Malloc(nlev*sizeof(size_t));
} }
} }
} }
...@@ -250,7 +250,7 @@ void *Arith(void *argument) ...@@ -250,7 +250,7 @@ void *Arith(void *argument)
{ {
pstreamInqRecord(streamIDx1, &varID, &levelID); pstreamInqRecord(streamIDx1, &varID, &levelID);
pstreamReadRecord(streamIDx1, fieldx1->ptr, &nmiss); pstreamReadRecord(streamIDx1, fieldx1->ptr, &nmiss);
fieldx1->nmiss = (size_t) nmiss; fieldx1->nmiss = nmiss;
int varID2 = varID; int varID2 = varID;
if ( tsID == 0 || filltype == FILL_NONE || filltype == FILL_FILE || filltype == FILL_VARTS ) if ( tsID == 0 || filltype == FILL_NONE || filltype == FILL_FILE || filltype == FILL_VARTS )
...@@ -261,7 +261,7 @@ void *Arith(void *argument) ...@@ -261,7 +261,7 @@ void *Arith(void *argument)
{ {
pstreamInqRecord(streamIDx2, &varID2, &levelID2); pstreamInqRecord(streamIDx2, &varID2, &levelID2);
pstreamReadRecord(streamIDx2, fieldx2->ptr, &nmiss); pstreamReadRecord(streamIDx2, fieldx2->ptr, &nmiss);
fieldx2->nmiss = (size_t) nmiss; fieldx2->nmiss = nmiss;
if ( varID != varID2 ) cdoAbort("Internal error, varIDs of input streams differ!"); if ( varID != varID2 ) cdoAbort("Internal error, varIDs of input streams differ!");
if ( levelID != levelID2 ) cdoAbort("Internal error, levelIDs of input streams differ!"); if ( levelID != levelID2 ) cdoAbort("Internal error, levelIDs of input streams differ!");
} }
...@@ -311,7 +311,7 @@ void *Arith(void *argument) ...@@ -311,7 +311,7 @@ void *Arith(void *argument)
farfun(&field1, field2, operfunc); farfun(&field1, field2, operfunc);
pstreamDefRecord(streamID3, varID, levelID); pstreamDefRecord(streamID3, varID, levelID);
pstreamWriteRecord(streamID3, field1.ptr, (int)field1.nmiss); pstreamWriteRecord(streamID3, field1.ptr, field1.nmiss);
} }
tsID++; tsID++;
......
...@@ -72,7 +72,7 @@ int *fill_vars(int vlistID) ...@@ -72,7 +72,7 @@ int *fill_vars(int vlistID)
void *Arithc(void *argument) void *Arithc(void *argument)
{ {
int nmiss; size_t nmiss;
int nrecs; int nrecs;
int varID, levelID; int varID, levelID;
...@@ -125,7 +125,7 @@ void *Arithc(void *argument) ...@@ -125,7 +125,7 @@ void *Arithc(void *argument)
{ {
pstreamInqRecord(streamID1, &varID, &levelID); pstreamInqRecord(streamID1, &varID, &levelID);
pstreamReadRecord(streamID1, field.ptr, &nmiss); pstreamReadRecord(streamID1, field.ptr, &nmiss);
field.nmiss = (size_t) nmiss; field.nmiss = nmiss;
if ( vars[varID] ) if ( vars[varID] )
{ {
...@@ -141,7 +141,7 @@ void *Arithc(void *argument) ...@@ -141,7 +141,7 @@ void *Arithc(void *argument)
if ( DBL_IS_EQUAL(field.ptr[i], field.missval) ) field.nmiss++; if ( DBL_IS_EQUAL(field.ptr[i], field.missval) ) field.nmiss++;
} }
nmiss = (int) field.nmiss; nmiss = field.nmiss;
pstreamDefRecord(streamID2, varID, levelID); pstreamDefRecord(streamID2, varID, levelID);
pstreamWriteRecord(streamID2, field.ptr, nmiss); pstreamWriteRecord(streamID2, field.ptr, nmiss);
} }
......
...@@ -73,7 +73,7 @@ void *Arithdays(void *argument) ...@@ -73,7 +73,7 @@ void *Arithdays(void *argument)
int nrecs; int nrecs;
int varID, levelID; int varID, levelID;
int year, month, day; int year, month, day;
int nmiss; size_t nmiss;
double rconst; double rconst;
cdoInitialize(argument); cdoInitialize(argument);
...@@ -143,14 +143,14 @@ void *Arithdays(void *argument) ...@@ -143,14 +143,14 @@ void *Arithdays(void *argument)
pstreamInqRecord(streamID1, &varID, &levelID); pstreamInqRecord(streamID1, &varID, &levelID);
pstreamReadRecord(streamID1, field.ptr, &nmiss); pstreamReadRecord(streamID1, field.ptr, &nmiss);
field.nmiss = (size_t)nmiss; field.nmiss = nmiss;
field.grid = vlistInqVarGrid(vlistID1, varID); field.grid = vlistInqVarGrid(vlistID1, varID);
field.missval = vlistInqVarMissval(vlistID1, varID); field.missval = vlistInqVarMissval(vlistID1, varID);
farcfun(&field, rconst, operfunc); farcfun(&field, rconst, operfunc);
pstreamDefRecord(streamID2, varID, levelID); pstreamDefRecord(streamID2, varID, levelID);
pstreamWriteRecord(streamID2, field.ptr, (int)field.nmiss); pstreamWriteRecord(streamID2, field.ptr, field.nmiss);
} }
tsID++; tsID++;
} }
......
...@@ -36,7 +36,7 @@ void *Arithlat(void *argument) ...@@ -36,7 +36,7 @@ void *Arithlat(void *argument)
int gridID0 = -1; int gridID0 = -1;
int nrecs; int nrecs;
int varID, levelID; int varID, levelID;
int nmiss; size_t nmiss;
long i; long i;
char units[CDI_MAX_NAME]; char units[CDI_MAX_NAME];
double *scale = NULL; double *scale = NULL;
......
...@@ -83,7 +83,7 @@ void *CDIread(void *argument) ...@@ -83,7 +83,7 @@ void *CDIread(void *argument)
{ {
int memtype = CDO_Memtype; int memtype = CDO_Memtype;
int varID, levelID; int varID, levelID;
int nmiss; size_t nmiss;
int nrecs; int nrecs;
int filetype = -1, datatype = -1; int filetype = -1, datatype = -1;
int nruns = 1; int nruns = 1;
......
...@@ -30,7 +30,7 @@ void *CDItest(void *argument) ...@@ -30,7 +30,7 @@ void *CDItest(void *argument)
{ {
int nrecs; int nrecs;
int varID, levelID; int varID, levelID;
int nmiss; size_t nmiss;
int max_copy = 3; int max_copy = 3;
double s_utime, s_stime; double s_utime, s_stime;
double e_utime, e_stime; double e_utime, e_stime;
......
...@@ -941,7 +941,8 @@ static void addcharvar(keyValues_t *charvars, int vlistID, const char *key, stru ...@@ -941,7 +941,8 @@ static void addcharvar(keyValues_t *charvars, int vlistID, const char *key, stru
{ {
while ( nrecs-- ) while ( nrecs-- )
{ {
int varIDrw, levelIDrw, nmiss; int varIDrw, levelIDrw;
size_t nmiss;
pstreamInqRecord(streamID2, &varIDrw, &levelIDrw); pstreamInqRecord(streamID2, &varIDrw, &levelIDrw);
for ( int i = 0; i < charvars->nvalues; i++ ) for ( int i = 0; i < charvars->nvalues; i++ )
if ( varIDrw == varIDs[i] ) if ( varIDrw == varIDs[i] )
...@@ -3680,7 +3681,7 @@ static void read_record(int streamID, struct mapping vars[], int vlistID) ...@@ -3680,7 +3681,7 @@ static void read_record(int streamID, struct mapping vars[], int vlistID)
int latdim = gridInqYsize(gridID); int latdim = gridInqYsize(gridID);
int levdim = zaxisInqSize(zaxisID); int levdim = zaxisInqSize(zaxisID);
int chardim = gridsize/latdim; int chardim = gridsize/latdim;
int nmiss; size_t nmiss;
pstreamReadRecord(streamID, buffer, &nmiss); pstreamReadRecord(streamID, buffer, &nmiss);
for ( size_t i = 0; i < gridsize; i++ ) for ( size_t i = 0; i < gridsize; i++ )
{ {
......
...@@ -364,7 +364,7 @@ void *CMOR_lite(void *argument) ...@@ -364,7 +364,7 @@ void *CMOR_lite(void *argument)
{ {
int nrecs; int nrecs;
int varID, levelID; int varID, levelID;
int nmiss; size_t nmiss;
bool delvars = false; bool delvars = false;
double missval; double missval;
......
...@@ -36,7 +36,7 @@ void *Cat(void *argument) ...@@ -36,7 +36,7 @@ void *Cat(void *argument)
int streamID2 = CDI_UNDEFID; int streamID2 = CDI_UNDEFID;
int vlistID2 = CDI_UNDEFID; int vlistID2 = CDI_UNDEFID;
int taxisID2 = CDI_UNDEFID; int taxisID2 = CDI_UNDEFID;
int nmiss; size_t nmiss;
double tw0 = 0, tw = 0; double tw0 = 0, tw = 0;
double *array = NULL; double *array = NULL;
......
...@@ -48,7 +48,7 @@ void *Change(void *argument) ...@@ -48,7 +48,7 @@ void *Change(void *argument)
int chcode = 0; int chcode = 0;
int param; int param;
int code, tabnum, i; int code, tabnum, i;
int nmiss; size_t nmiss;
int nfound; int nfound;
int nzaxis, zaxisID1, zaxisID2, k, nlevs, index; int nzaxis, zaxisID1, zaxisID2, k, nlevs, index;
double chlevels[MAXARG]; double chlevels[MAXARG];
......
...@@ -32,7 +32,7 @@ void *Change_e5slm(void *argument) ...@@ -32,7 +32,7 @@ void *Change_e5slm(void *argument)
char name[CDI_MAX_NAME]; char name[CDI_MAX_NAME];
int nrecs; int nrecs;
int varID, levelID; int varID, levelID;
int nmiss; size_t nmiss;
cdoInitialize(argument); cdoInitialize(argument);
......
...@@ -127,7 +127,7 @@ void *Cloudlayer(void *argument) ...@@ -127,7 +127,7 @@ void *Cloudlayer(void *argument)
bool zrev = false; bool zrev = false;
int i; int i;
int offset; int offset;
int nmiss; size_t nmiss;
int aclcacID = -1; int aclcacID = -1;
int nvars2 = 0; int nvars2 = 0;
int aclcac_code_found = 0; int aclcac_code_found = 0;
......
...@@ -29,7 +29,7 @@ typedef struct ...@@ -29,7 +29,7 @@ typedef struct
int streamID; int streamID;
int vlistID; int vlistID;
int gridID; int gridID;
int nmiss; size_t nmiss;
int gridsize; int gridsize;
int *gridindex; int *gridindex;
double *array; double *array;
...@@ -535,7 +535,7 @@ void *Collgrid(void *argument) ...@@ -535,7 +535,7 @@ void *Collgrid(void *argument)
if ( vars[varID2] ) if ( vars[varID2] )
{ {
int nmiss = 0; size_t nmiss = 0;
for ( int i = 0; i < gridsize2; i++ ) for ( int i = 0; i < gridsize2; i++ )
if ( DBL_IS_EQUAL(array2[i], missval) ) nmiss++; if ( DBL_IS_EQUAL(array2[i], missval) ) nmiss++;
......
...@@ -167,7 +167,7 @@ int com_stat(const char *arg) ...@@ -167,7 +167,7 @@ int com_stat(const char *arg)
else else
{ {
int i; int i;
int nmiss; size_t nmiss;
int gridsize; int gridsize;
double fmin = 1.e50 , fmax = -1.e50, fmean = 0; double fmin = 1.e50 , fmax = -1.e50, fmean = 0;
counter_t counter; counter_t counter;
...@@ -321,7 +321,7 @@ void command_init() ...@@ -321,7 +321,7 @@ void command_init()
void *Command(void *argument) void *Command(void *argument)
{ {
// int recID, varID, levelID; // int recID, varID, levelID;
// int nmiss; // size_t nmiss;
double s_utime, s_stime; double s_utime, s_stime;
double e_utime, e_stime; double e_utime, e_stime;
double c_cputime = 0, c_usertime = 0, c_systime = 0; double c_cputime = 0, c_usertime = 0, c_systime = 0;
......
...@@ -179,7 +179,7 @@ void *Comp(void *argument) ...@@ -179,7 +179,7 @@ void *Comp(void *argument)
for ( int recID = 0; recID < nrecs; recID++ ) for ( int recID = 0; recID < nrecs; recID++ )
{ {
int nmiss1; size_t nmiss1;
pstreamInqRecord(streamIDx1, &varID, &levelID); pstreamInqRecord(streamIDx1, &varID, &levelID);
pstreamReadRecord(streamIDx1, arrayx1, &nmiss1); pstreamReadRecord(streamIDx1, arrayx1, &nmiss1);
...@@ -187,7 +187,7 @@ void *Comp(void *argument) ...@@ -187,7 +187,7 @@ void *Comp(void *argument)
{ {
if ( recID == 0 || filltype != FILL_REC ) if ( recID == 0 || filltype != FILL_REC )
{ {
int nmiss2; size_t nmiss2;
pstreamInqRecord(streamIDx2, &varID, &levelID); pstreamInqRecord(streamIDx2, &varID, &levelID);
pstreamReadRecord(streamIDx2, arrayx2, &nmiss2); pstreamReadRecord(streamIDx2, arrayx2, &nmiss2);
} }
...@@ -266,7 +266,7 @@ void *Comp(void *argument) ...@@ -266,7 +266,7 @@ void *Comp(void *argument)
cdoAbort("Operator not implemented!"); cdoAbort("Operator not implemented!");
} }
int nmiss3 = 0; size_t nmiss3 = 0;
for ( int i = 0; i < gridsize; i++ ) for ( int i = 0; i < gridsize; i++ )
if ( DBL_IS_EQUAL(array3[i], missval1) ) nmiss3++; if ( DBL_IS_EQUAL(array3[i], missval1) ) nmiss3++;
......
...@@ -37,7 +37,7 @@ void *Compc(void *argument) ...@@ -37,7 +37,7 @@ void *Compc(void *argument)
{ {
int nrecs; int nrecs;
int varID, levelID; int varID, levelID;
int nmiss, nmiss2; size_t nmiss, nmiss2;
int i; int i;
double missval; double missval;
int rc_is_missval; int rc_is_missval;
......
...@@ -28,7 +28,7 @@ void *Complextorect(void *argument) ...@@ -28,7 +28,7 @@ void *Complextorect(void *argument)
int varID, levelID; int varID, levelID;
int i; int i;
int datatype; int datatype;
int nmiss; size_t nmiss;
cdoInitialize(argument); cdoInitialize(argument);
......
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