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

Merge branch 'test' into develop

parents 541a1d7f a9ea605e
......@@ -35,11 +35,11 @@ void *Cond(void *argument)
int nrecs, nrecs2, nvars = 0, nlev;
int varID, levelID;
int offset;
int nmiss1, nmiss2, nmiss3;
size_t nmiss1, nmiss2, nmiss3;
int i;
double missval1 = -9.E33;
double missval2 = -9.E33;
int **varnmiss1 = NULL;
size_t **varnmiss1 = NULL;
double **vardata1 = NULL;
cdoInitialize(argument);
......@@ -103,13 +103,13 @@ void *Cond(void *argument)
nvars = vlistNvars(vlistID1);
vardata1 = (double **) Malloc(nvars*sizeof(double *));
varnmiss1 = (int **) Malloc(nvars*sizeof(int *));
varnmiss1 = (size_t **) Malloc(nvars*sizeof(size_t *));
for ( varID = 0; varID < nvars; varID++ )
{
gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
nlev = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
vardata1[varID] = (double*) Malloc(nlev*gridsize*sizeof(double));
varnmiss1[varID] = (int*) Malloc(nlev*sizeof(int));
varnmiss1[varID] = (size_t*) Malloc(nlev*sizeof(size_t));
}
}
}
......
......@@ -34,11 +34,11 @@ void *Cond2(void *argument)
int nrecs, nrecs2, nvars = 0, nlev;
int varID, levelID;
int offset;
int nmiss1, nmiss2, nmiss3, nmiss4;
size_t nmiss1, nmiss2, nmiss3, nmiss4;
int i;
double missval1 = -9.E33;
double missval2 = -9.E33;
int **varnmiss1 = NULL;
size_t **varnmiss1 = NULL;
double **vardata1 = NULL;
cdoInitialize(argument);
......@@ -106,13 +106,13 @@ void *Cond2(void *argument)
nvars = vlistNvars(vlistID1);
vardata1 = (double **) Malloc(nvars*sizeof(double *));
varnmiss1 = (int **) Malloc(nvars*sizeof(int *));
varnmiss1 = (size_t **) Malloc(nvars*sizeof(size_t *));
for ( varID = 0; varID < nvars; varID++ )
{
gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
nlev = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
vardata1[varID] = (double*) Malloc(nlev*gridsize*sizeof(double));
varnmiss1[varID] = (int*) Malloc(nlev*sizeof(int));
varnmiss1[varID] = (size_t*) Malloc(nlev*sizeof(size_t));
}
}
}
......
......@@ -33,7 +33,7 @@ void *Condc(void *argument)
{
int nrecs;
int varID, levelID;
int nmiss, nmiss2;
size_t nmiss, nmiss2;
int i;
double missval;
......
......@@ -127,7 +127,7 @@ void *Consecstat(void *argument)
int nrecs;
int varID;
int levelID, nlevels;
int nmiss;
size_t nmiss;
double refval = 0.0;
cdoInitialize(argument);
......@@ -197,7 +197,7 @@ void *Consecstat(void *argument)
{
pstreamInqRecord(istreamID, &varID, &levelID);
pstreamReadRecord(istreamID, field.ptr, &nmiss);
field.nmiss = (size_t)nmiss;
field.nmiss = nmiss;
field.grid = vlistInqVarGrid(ovlistID, varID);
field.missval = vlistInqVarMissval(ovlistID, varID);
......@@ -207,14 +207,14 @@ void *Consecstat(void *argument)
{
case CONSECSUM:
pstreamDefRecord(ostreamID, varID, levelID);
pstreamWriteRecord(ostreamID, vars[varID][levelID].ptr, (int)vars[varID][levelID].nmiss);
pstreamWriteRecord(ostreamID, vars[varID][levelID].ptr, vars[varID][levelID].nmiss);
break;
case CONSECTS:
if ( itsID != 0 )
{
selEndOfPeriod(&periods[varID][levelID], hist[varID][levelID], vars[varID][levelID], FALSE);
pstreamDefRecord(ostreamID, varID, levelID);
pstreamWriteRecord(ostreamID, periods[varID][levelID].ptr, (int)periods[varID][levelID].nmiss);
pstreamWriteRecord(ostreamID, periods[varID][levelID].ptr, periods[varID][levelID].nmiss);
}
#if defined(_OPENMP)
#pragma omp parallel for default(shared) schedule(static)
......@@ -249,7 +249,7 @@ void *Consecstat(void *argument)
{
selEndOfPeriod(&periods[varID][levelID], hist[varID][levelID], vars[varID][levelID], TRUE);
pstreamDefRecord(ostreamID, varID, levelID);
pstreamWriteRecord(ostreamID, periods[varID][levelID].ptr, (int)periods[varID][levelID].nmiss);
pstreamWriteRecord(ostreamID, periods[varID][levelID].ptr, periods[varID][levelID].nmiss);
}
}
}
......
......@@ -44,7 +44,7 @@ void *Copy(void *argument)
int taxisID2 = CDI_UNDEFID;
int nrecs;
int varID, levelID;
int nmiss;
size_t nmiss;
int ntsteps, nvars;
double *array = NULL;
par_io_t parIO;
......
......@@ -31,7 +31,7 @@
void *Deltat(void *argument)
{
int varID, levelID;
int nmiss;
size_t nmiss;
cdoInitialize(argument);
......
......@@ -29,7 +29,7 @@ void *Deltime(void *argument)
int vdate /*, vtime */;
int copytimestep;
int gridsize;
int nmiss;
size_t nmiss;
int year, month, day;
int dday, dmon;
double *array = NULL;
......
......@@ -50,7 +50,7 @@ void *Derivepar(void *argument)
char varname[CDI_MAX_NAME], stdname[CDI_MAX_NAME];
double *single2;
// double *lwater = NULL, *iwater = NULL;
int nmiss, nmissout = 0;
size_t nmiss, nmissout = 0;
double *full_press = NULL;
double minval, maxval;
int instNum, tableNum;
......
......@@ -69,7 +69,7 @@ void *Detrend(void *argument)
int gridID, varID, levelID;
int i;
int nalloc = 0;
int nmiss;
size_t nmiss;
int nlevel;
double missval;
field_type ***vars = NULL;
......
......@@ -34,7 +34,7 @@ void *Diff(void *argument)
int nrecs, nrecs2;
int varID1, varID2;
int levelID;
int nmiss1, nmiss2;
size_t nmiss1, nmiss2;
int ndrec = 0, nd2rec = 0, ngrec = 0;
char varname[CDI_MAX_NAME];
char paramstr[32];
......@@ -185,7 +185,7 @@ void *Diff(void *argument)
set_text_color(stdout, RESET, GREEN);
double level = cdoZaxisInqLevel(zaxisID, levelID);
fprintf(stdout, "%7g ", level);
fprintf(stdout, "%8d %7d ", gridsize, MAX(nmiss1, nmiss2));
fprintf(stdout, "%8d %7zu ", gridsize, MAX(nmiss1, nmiss2));
fprintf(stdout, "%7d ", ndiff);
reset_text_color(stdout);
......
......@@ -210,7 +210,7 @@ void *Distgrid(void *argument)
char filename[8192];
int index;
int gridtype = -1;
int nmiss;
size_t nmiss;
int i;
cdoInitialize(argument);
......
......@@ -29,7 +29,7 @@ void *Duplicate(void *argument)
int nrecs;
int varID, levelID;
int nalloc = 0;
int nmiss;
size_t nmiss;
int *vdate = NULL, *vtime = NULL;
int ndup = 2;
field_type ***vars = NULL;
......
......@@ -168,7 +168,7 @@ void *EOFs(void * argument)
enum {EOF_, EOF_TIME, EOF_SPATIAL};
int nlevs = 0 ;
int nmiss;
size_t nmiss;
int varID, levelID;
int nts = 0;
size_t n = 0;
......
......@@ -1433,7 +1433,8 @@ void *Echam5ini(void *argument)
int vlistID1, vlistID2;
int nvars = 0;
int iv, nlev;
int gridsize, nmiss;
int gridsize;
size_t nmiss;
int taxisID, tsID;
cdoInitialize(argument);
......
......@@ -79,7 +79,8 @@ void *Enlarge(void *argument)
for ( int recID = 0; recID < nrecs; recID++ )
{
int varID, levelID, nmiss;
int varID, levelID;
size_t nmiss;
pstreamInqRecord(streamID1, &varID, &levelID);
pstreamReadRecord(streamID1, array1, &nmiss);
......
......@@ -215,7 +215,8 @@ void *Enlargegrid(void *argument)
for ( int recID = 0; recID < nrecs; recID++ )
{
int varID, levelID, nmiss1;
int varID, levelID;
size_t nmiss1;
pstreamInqRecord(streamID1, &varID, &levelID);
pstreamReadRecord(streamID1, array1, &nmiss1);
......@@ -226,7 +227,7 @@ void *Enlargegrid(void *argument)
if ( gindex[i] >= 0 )
array2[gindex[i]] = array1[i];
int nmiss2 = 0;
size_t nmiss2 = 0;
for ( int i = 0; i < gridsize2; i++ )
if ( DBL_IS_EQUAL(array2[i], missval1) ) nmiss2++;
......
......@@ -43,7 +43,7 @@ typedef struct
{
int streamID;
int vlistID;
int nmiss[2];
size_t nmiss[2];
double missval[2];
double *array[2];
} ens_file_t;
......@@ -87,7 +87,7 @@ void *ensstat_func(void *ensarg)
int gridsize = gridInqSize(gridID);
double missval = vlistInqVarMissval(arg->vlistID1, arg->varID[t]);
int nmiss = 0;
size_t nmiss = 0;
#if defined(_OPENMP)
#pragma omp parallel for default(shared)
#endif
......
......@@ -52,7 +52,8 @@ double roc_curve_integrate(const double **roc, const int n);
void *Ensstat3(void *argument)
{
int i,j;
int nrecs = 0, nrecs0, nmiss;
int nrecs = 0, nrecs0;
size_t nmiss;
int cum;
int chksum; // for check of histogram population
int levelID, varID, binID = 0;
......
......@@ -43,7 +43,8 @@ enum RESTYPE_CRPS { CRPS_RES,CRPS_RELI,CRPS_POT };
void *Ensval(void *argument)
{
int i,k;
int nrecs = 0, nrecs0, nmiss, nostreams = 0, ngrids;
int nrecs = 0, nrecs0, nostreams = 0, ngrids;
size_t nmiss;
int levelID, varID;
int gridsize = 0;
int vlistID;
......
......@@ -53,7 +53,8 @@ void *EOF3d(void * argument)
size_t temp_size = 0, npack = 0;
int varID, levelID;
bool missval_warning = false;
int nmiss, ngrids;
size_t nmiss;
int ngrids;
int n = 0;
size_t nlevs = 0;
int timer_cov = 0, timer_eig = 0;
......
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