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