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

Merge branch 'test' into develop

parents 541a1d7f a9ea605e
......@@ -127,7 +127,7 @@ void *Merge(void *argument)
int levelID, levelID2;
int index;
int gridsize;
int nmiss;
size_t nmiss;
cdoInitialize(argument);
......
......@@ -160,7 +160,7 @@ void *Mergegrid(void *argument)
{
int varID, levelID;
int nrecs = 0;
int nmiss1, nmiss2;
size_t nmiss1, nmiss2;
int index;
cdoInitialize(argument);
......
......@@ -185,7 +185,7 @@ void *Mergetime(void *argument)
}
else
{
int nmiss;
size_t nmiss;
pstreamReadRecord(sf[fileID].streamID, array, &nmiss);
pstreamWriteRecord(streamID2, array, nmiss);
}
......
......@@ -44,7 +44,7 @@ void *Merstat(void *argument)
int gridID1, gridID2 = -1, lastgrid = -1;
int wstatus = FALSE;
int index;
int nmiss;
size_t nmiss;
int nrecs;
int varID, levelID;
char varname[CDI_MAX_NAME];
......@@ -139,7 +139,7 @@ void *Merstat(void *argument)
{
pstreamInqRecord(streamID1, &varID, &levelID);
pstreamReadRecord(streamID1, field1.ptr, &nmiss);
field1.nmiss = (size_t) nmiss;
field1.nmiss = nmiss;
field1.grid = vlistInqVarGrid(vlistID1, varID);
if ( needWeights && field1.grid != lastgrid )
{
......@@ -160,7 +160,7 @@ void *Merstat(void *argument)
merfun(field1, &field2, operfunc);
pstreamDefRecord(streamID2, varID, levelID);
pstreamWriteRecord(streamID2, field2.ptr, (int)field2.nmiss);
pstreamWriteRecord(streamID2, field2.ptr, field2.nmiss);
}
tsID++;
......
......@@ -35,7 +35,7 @@ void *Monarith(void *argument)
int nrecs, nrecs2, nlev;
int varID, levelID;
int offset;
int nmiss;
size_t nmiss;
int yearmon2 = -1;
cdoInitialize(argument);
......@@ -76,14 +76,14 @@ void *Monarith(void *argument)
int nvars = vlistNvars(vlistID2);
double **vardata2 = (double **) Malloc(nvars*sizeof(double *));
int **varnmiss2 = (int **) Malloc(nvars*sizeof(int *));
size_t **varnmiss2 = (size_t **) Malloc(nvars*sizeof(size_t *));
for ( varID = 0; varID < nvars; varID++ )
{
gridsize = gridInqSize(vlistInqVarGrid(vlistID2, varID));
nlev = zaxisInqSize(vlistInqVarZaxis(vlistID2, varID));
vardata2[varID] = (double*) Malloc(nlev*gridsize*sizeof(double));
varnmiss2[varID] = (int*) Malloc(nlev*sizeof(int));
varnmiss2[varID] = (size_t*) Malloc(nlev*sizeof(size_t));
}
int tsID = 0;
......@@ -138,7 +138,7 @@ void *Monarith(void *argument)
{
pstreamInqRecord(streamID1, &varID, &levelID);
pstreamReadRecord(streamID1, field1.ptr, &nmiss);
field1.nmiss = (size_t) nmiss;
field1.nmiss = nmiss;
field1.grid = vlistInqVarGrid(vlistID1, varID);
field1.missval = vlistInqVarMissval(vlistID1, varID);
......@@ -152,7 +152,7 @@ void *Monarith(void *argument)
farfun(&field1, field2, operfunc);
pstreamDefRecord(streamID3, varID, levelID);
pstreamWriteRecord(streamID3, field1.ptr, (int)field1.nmiss);
pstreamWriteRecord(streamID3, field1.ptr, field1.nmiss);
}
tsID++;
......
......@@ -194,7 +194,7 @@ void *Mrotuv(void *argument)
int nrecs;
int levelID;
int varID, varid;
int nmiss1, nmiss2;
size_t nmiss1, nmiss2;
int uid = -1, vid = -1;
cdoInitialize(argument);
......
......@@ -258,7 +258,7 @@ void *Mrotuvb(void *argument)
int nrecs, nrecs2;
int levelID;
int varID1, varID2;
int nmiss1, nmiss2;
size_t nmiss1, nmiss2;
bool gpint = true;
cdoInitialize(argument);
......
......@@ -40,7 +40,7 @@ void *Output(void *argument)
int gridID;
int nrecs;
int levelID;
int nmiss;
size_t nmiss;
int nelem = 1;
int len;
int index;
......
......@@ -204,7 +204,7 @@ void *Outputgmt(void *argument)
int gridsize2 = 0;
int nrecs;
int levelID;
int nmiss;
size_t nmiss;
int ninc = 1;
bool lzon = false, lmer = false, lhov = false;
bool lgrid_gen_bounds = false, luse_grid_corner = false;
......
......@@ -85,7 +85,7 @@ void *Pack(void *argument)
int nrecs;
int gridID, varID, levelID;
int nalloc = 0;
int nmiss;
size_t nmiss;
int nlevel;
int datatype = CDI_DATATYPE_INT16;
dtlist_type *dtlist = dtlist_new();
......
......@@ -34,7 +34,7 @@ void *Pardup(void *argument)
int varID, varID2, levelID;
long offset;
int nmul = 0;
int nmiss;
size_t nmiss;
int nlevel;
double *single;
......@@ -75,14 +75,14 @@ void *Pardup(void *argument)
int gridsize = vlistGridsizeMax(vlistID1);
double *array = (double*) Malloc(gridsize*sizeof(double));
double **vardata = (double **) Malloc(nvars*sizeof(double *));
int **varnmiss = (int **) Malloc(nvars*sizeof(int *));
size_t **varnmiss = (size_t **) Malloc(nvars*sizeof(size_t *));
for ( varID = 0; varID < nvars; varID++ )
{
gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
nlevel = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
vardata[varID] = (double*) Malloc(gridsize*nlevel*sizeof(double));
varnmiss[varID] = (int*) Malloc(nlevel*sizeof(int));
varnmiss[varID] = (size_t*) Malloc(nlevel*sizeof(size_t));
}
for ( int i = 1; i < nmul; i++ )
......
......@@ -33,8 +33,8 @@ void *Pinfo(void *argument)
int varID;
int nrecs;
int levelID;
int nmiss;
int ivals = 0, imiss = 0;
size_t nmiss, imiss = 0;
int ivals = 0;
char varname[CDI_MAX_NAME];
char vdatestr[32], vtimestr[32];
double level;
......@@ -113,7 +113,7 @@ void *Pinfo(void *argument)
level = cdoZaxisInqLevel(zaxisID, levelID);
fprintf(stdout, " %7g ", level);
fprintf(stdout, "%7d %7d :", gridsize, nmiss);
fprintf(stdout, "%7d %7zu :", gridsize, nmiss);
if ( gridInqType(gridID) == GRID_SPECTRAL ||
(gridsize == 1 && nmiss == 0) )
......@@ -170,7 +170,7 @@ void *Pinfo(void *argument)
}
if ( imiss != nmiss && nmiss > 0 )
fprintf(stdout, "Found %d of %d missing values!\n", imiss, nmiss);
fprintf(stdout, "Found %zu of %zu missing values!\n", imiss, nmiss);
}
for ( i = 0; i < gridsize; i++ ) array2[i] = array1[i];
......
......@@ -43,7 +43,7 @@ void *Pressure(void *argument)
int zaxisIDp, zaxisIDh = -1;
int nhlevf = 0, nhlevh = 0, nlevel = 0;
int nvct = 0;
int nmiss;
size_t nmiss;
int psID = -1, lnpsID = -1;
char paramstr[32];
char varname[CDI_MAX_NAME];
......
......@@ -33,7 +33,7 @@ void *Regres(void *argument)
{
int nrecs;
int varID, levelID;
int nmiss;
size_t nmiss;
double temp1, temp2;
enum {nwork = 5};
field_type **work[nwork];
......
......@@ -117,7 +117,7 @@ int maptype2operfunc(int map_type, int submap_type, int num_neighbors, int remap
}
static
void print_remap_info(int operfunc, int remap_genweights, remapgrid_t *src_grid, remapgrid_t *tgt_grid, int nmiss)
void print_remap_info(int operfunc, int remap_genweights, remapgrid_t *src_grid, remapgrid_t *tgt_grid, size_t nmiss)
{
char line[256], tmpstr[256];
......@@ -155,7 +155,7 @@ void print_remap_info(int operfunc, int remap_genweights, remapgrid_t *src_grid,
if ( nmiss > 0 )
{
snprintf(tmpstr, sizeof(tmpstr), ", with source mask (%d)", gridInqSize(src_grid->gridID)-nmiss);
snprintf(tmpstr, sizeof(tmpstr), ", with source mask (%zu)", gridInqSize(src_grid->gridID)-nmiss);
strcat(line, tmpstr);
}
......@@ -163,7 +163,7 @@ void print_remap_info(int operfunc, int remap_genweights, remapgrid_t *src_grid,
}
static
void print_remap_warning(const char *remap_file, int operfunc, remapgrid_t *src_grid, int nmiss)
void print_remap_warning(const char *remap_file, int operfunc, remapgrid_t *src_grid, size_t nmiss)
{
char line[256];
char tmpstr[256];
......@@ -196,7 +196,7 @@ void print_remap_warning(const char *remap_file, int operfunc, remapgrid_t *src_
if ( nmiss > 0 )
{
snprintf(tmpstr, sizeof(tmpstr), " with mask (%d)", gridInqSize(src_grid->gridID)-nmiss);
snprintf(tmpstr, sizeof(tmpstr), " with mask (%zu)", gridInqSize(src_grid->gridID)-nmiss);
strcat(line, tmpstr);
}
......@@ -780,7 +780,7 @@ void *Remap(void *argument)
int varID, levelID;
size_t gridsize, gridsize2;
int gridID1 = -1, gridID2;
int nmiss1, nmiss2;
size_t nmiss1, nmiss2;
size_t i, j;
int r = -1;
int nremaps = 0;
......
......@@ -243,7 +243,7 @@ Remapeta(void *argument)
double *t1 = NULL, *q1 = NULL;
double *t2 = NULL, *q2 = NULL;
double *tscor = NULL, *pscor = NULL, *secor = NULL;
int nmiss, nmissout = 0;
size_t nmiss, nmissout = 0;
bool ltq = false;
bool lfis2 = false;
int varids[MAX_VARS3D];
......
......@@ -38,10 +38,10 @@ void *Replace(void *argument)
int nchvars = 0;
int idx;
char varname1[CDI_MAX_NAME], varname2[CDI_MAX_NAME];
int nmiss;
size_t nmiss;
int varlist1[MAX_VARS], varlist2[MAX_VARS];
int **varlevel = NULL;
int **varnmiss2 = NULL;
size_t **varnmiss2 = NULL;
double **vardata2 = NULL;
double *parray;
......@@ -102,7 +102,7 @@ void *Replace(void *argument)
if ( nchvars )
{
vardata2 = (double **) Malloc(nchvars*sizeof(double *));
varnmiss2 = (int **) Malloc(nchvars*sizeof(int *));
varnmiss2 = (size_t **) Malloc(nchvars*sizeof(size_t *));
varlevel = (int **) Malloc(nchvars*sizeof(int *));
for ( idx = 0; idx < nchvars; idx++ )
{
......@@ -112,7 +112,7 @@ void *Replace(void *argument)
int nlevel2 = zaxisInqSize(vlistInqVarZaxis(vlistID2, varID2));
int gridsize = gridInqSize(vlistInqVarGrid(vlistID2, varID2));
vardata2[idx] = (double*) Malloc(nlevel2*gridsize*sizeof(double));
varnmiss2[idx] = (int*) Malloc(nlevel2*sizeof(int));
varnmiss2[idx] = (size_t*) Malloc(nlevel2*sizeof(size_t));
varlevel[idx] = (int*) Malloc(nlevel1*sizeof(int));
/*
for ( levelID = 0; levelID < nlevel1; levelID++ )
......
......@@ -34,7 +34,7 @@ void *Replacevalues(void *argument)
{
int nrecs;
int varID, levelID;
int nmiss;
size_t nmiss;
int nvals = 0;
lista_t *flista = lista_new(FLT_LISTA);
double *fltarr = NULL;
......
......@@ -155,7 +155,7 @@ void *Rhopot(void *argument)
int varID, levelID;
int zaxisID;
int offset;
int nmiss;
size_t nmiss;
int toID = -1, saoID = -1, thoID = -1;
char varname[CDI_MAX_NAME], stdname[CDI_MAX_NAME];
double pin = -1;
......
......@@ -127,7 +127,7 @@ void *Rotuv(void *argument)
int *recVarID = (int*) Malloc(nrecs*sizeof(int));
int *recLevelID = (int*) Malloc(nrecs*sizeof(int));
int **varnmiss = (int **) Malloc(nvars*sizeof(int *));
size_t **varnmiss = (size_t **) Malloc(nvars*sizeof(size_t *));
double **vardata = (double **) Malloc(nvars*sizeof(double *));
bool lfound[MAXARG];
......@@ -164,7 +164,7 @@ void *Rotuv(void *argument)
gridsize = gridInqSize(gridID);
nlevel = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
varnmiss[varID] = (int*) Malloc(nlevel*sizeof(int));
varnmiss[varID] = (size_t*) Malloc(nlevel*sizeof(size_t));
vardata[varID] = (double*) Malloc(gridsize*nlevel*sizeof(double));
}
......
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