Commit 406dd059 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

EOF cleanup.

parent f314fa66
......@@ -167,7 +167,6 @@ void *EOFs(void * argument)
{
enum {EOF_, EOF_TIME, EOF_SPATIAL};
int i, j, j1, j2;
int nlevs = 0 ;
int nmiss;
int tsID;
......@@ -180,13 +179,11 @@ void *EOFs(void * argument)
int calendar = CALENDAR_STANDARD;
juldate_t juldate;
double sum;
double missval = 0;
double xvals, yvals;
typedef struct {
int init;
int first_call;
bool init;
bool first_call;
double *eig_val;
double *covar_array;
double **covar;
......@@ -210,7 +207,7 @@ void *EOFs(void * argument)
int operfunc = cdoOperatorF1(operatorID);
operatorInputArg("Number of eigen functions to write out");
int n_eig = parameter2int(operatorArgv()[0]);
int n_eig = parameter2int(operatorArgv()[0]);
enum T_EIGEN_MODE eigen_mode = get_eigenmode();
enum T_WEIGHT_MODE weight_mode = get_weightmode();
......@@ -226,12 +223,10 @@ void *EOFs(void * argument)
int ngrids = vlistNgrids(vlistID1);
for ( int index = 1; index < ngrids; index++ )
if ( vlistGrid(vlistID1, 0) != vlistGrid(vlistID1, index))
{
cdoAbort("Too many different grids!");
}
cdoAbort("Too many different grids!");
double *weight = (double *) Malloc(gridsize*sizeof(double));
for ( i = 0; i < gridsize; ++i ) weight[i] = 1.;
for ( int i = 0; i < gridsize; ++i ) weight[i] = 1.;
if ( weight_mode == WEIGHT_ON )
{
......@@ -298,7 +293,7 @@ void *EOFs(void * argument)
{
cdoWarning("Solving in time-space:");
cdoWarning("Number of eigen-functions to write out is bigger than number of time-steps.");
cdoWarning("Setting n_eig to %i.", nts);
cdoWarning("Setting n_eig to %d.", nts);
cdoWarning("If You want to force a solution in grid-space use operator eofspatial");
n_eig = nts;
}
......@@ -312,7 +307,7 @@ void *EOFs(void * argument)
{
cdoWarning("Solving in spatial space");
cdoWarning("Number of eigen-functions to write out is bigger than grid size");
cdoWarning("Setting n_eig to %i", gridsize);
cdoWarning("Setting n_eig to %d", gridsize);
cdoWarning("If You want to force a solution in time-space use operator eoftime");
n_eig = gridsize;
}
......@@ -320,8 +315,8 @@ void *EOFs(void * argument)
}
if ( cdoVerbose )
cdoPrint("Calculating %i eigenvectors and %i eigenvalues in %s",
n_eig,n,grid_space==1?"grid_space" : "time_space");
cdoPrint("Calculating %d eigenvectors and %d eigenvalues in %s",
n_eig, n, grid_space==1?"grid_space" : "time_space");
/* allocation of temporary fields and output structures */
int npack = -1;
......@@ -339,8 +334,8 @@ void *EOFs(void * argument)
for ( levelID = 0; levelID < nlevs; ++levelID )
{
eofdata[varID][levelID].init = 0;
eofdata[varID][levelID].first_call = TRUE;
eofdata[varID][levelID].init = false;
eofdata[varID][levelID].first_call = true;
eofdata[varID][levelID].eig_val = NULL;
eofdata[varID][levelID].covar_array = NULL;
eofdata[varID][levelID].covar = NULL;
......@@ -352,9 +347,8 @@ void *EOFs(void * argument)
}
if ( cdoVerbose )
cdoPrint("Allocated eigenvalue/eigenvector structures with nts=%i gridsize=%i", nts, gridsize);
cdoPrint("Allocated eigenvalue/eigenvector structures with nts=%d gridsize=%d", nts, gridsize);
int ipack, jpack;
double *covar_array = NULL;
double **covar = NULL;
double sum_w = 1.;
......@@ -377,31 +371,31 @@ void *EOFs(void * argument)
if ( npack == -1 )
{
npack = 0;
for ( i = 0; i < gridsize; ++i )
for ( int i = 0; i < gridsize; ++i )
{
if ( !DBL_IS_EQUAL(weight[i], 0.0) && !DBL_IS_EQUAL(weight[i], missval) &&
!DBL_IS_EQUAL(in[i], missval) )
pack[npack++] = i;
}
{
pack[npack] = i;
npack++;
}
}
if ( weight_mode == WEIGHT_ON )
{
sum_w = 0;
for ( i = 0; i < npack; i++ ) sum_w += weight[pack[i]];
for ( int i = 0; i < npack; i++ ) sum_w += weight[pack[i]];
}
}
ipack = 0;
for ( i = 0; i < gridsize; ++i )
int ipack = 0;
for ( int i = 0; i < gridsize; ++i )
{
if ( !DBL_IS_EQUAL(weight[i], 0.0) && !DBL_IS_EQUAL(weight[i], missval) &&
!DBL_IS_EQUAL(in[i], missval) && pack[ipack++] != i )
{
cdoAbort("Missing values unsupported!");
}
else if ( DBL_IS_EQUAL(in[i], missval) && pack[ipack] == i )
!DBL_IS_EQUAL(in[i], missval) )
{
cdoAbort("Missing values unsupported!");
if ( pack[ipack] != i ) cdoAbort("Missing values unsupported!");
ipack++;
}
}
......@@ -409,14 +403,12 @@ void *EOFs(void * argument)
{
if ( !eofdata[varID][levelID].init )
{
n = npack;
double *covar_array = (double *) Malloc(npack*npack*sizeof(double));
n = npack;
double *covar_array = (double *) Malloc(((size_t)npack)*npack*sizeof(double));
covar = (double **) Malloc(npack*sizeof(double *));
for ( i = 0; i < npack; ++i ) covar[i] = covar_array + npack*i;
for ( i = 0; i < npack; ++i )
{
for ( j = 0; j < npack; ++j ) covar[i][j] = 0;
}
for ( int i = 0; i < npack; ++i ) covar[i] = covar_array + ((size_t)npack)*i;
for ( int i = 0; i < npack; ++i )
for ( int j = 0; j < npack; ++j ) covar[i][j] = 0;
eofdata[varID][levelID].covar_array = covar_array;
eofdata[varID][levelID].covar = covar;
......@@ -426,11 +418,11 @@ void *EOFs(void * argument)
covar = eofdata[varID][levelID].covar;
}
#if defined(_OPENMP)
#pragma omp parallel for private(ipack, jpack) default(shared)
#pragma omp parallel for default(shared)
#endif
for ( ipack = 0; ipack < npack; ++ipack )
for ( int ipack = 0; ipack < npack; ++ipack )
{
for ( jpack = ipack; jpack < npack; ++jpack )
for ( int jpack = ipack; jpack < npack; ++jpack )
covar[ipack][jpack] += in[pack[ipack]] * in[pack[jpack]];
}
}
......@@ -439,11 +431,11 @@ void *EOFs(void * argument)
double *data = (double *) Malloc(npack*sizeof(double));
eofdata[varID][levelID].data[tsID] = data;
for ( ipack = 0; ipack < npack; ipack++ )
for ( int ipack = 0; ipack < npack; ipack++ )
data[ipack] = in[pack[ipack]];
}
eofdata[varID][levelID].init = 1;
eofdata[varID][levelID].init = true;
}
tsID++;
......@@ -456,21 +448,21 @@ void *EOFs(void * argument)
/* write files with eigenvalues (ID3) and eigenvectors (ID2) */
/* eigenvalues */
int streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
int streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
int vlistID2 = vlistDuplicate(vlistID1);
int taxisID2 = taxisDuplicate(taxisID1);
int vlistID2 = vlistDuplicate(vlistID1);
int taxisID2 = taxisDuplicate(taxisID1);
taxisDefRdate(taxisID2, 0);
taxisDefRtime(taxisID2, 0);
vlistDefTaxis(vlistID2, taxisID2);
int gridID2 = gridCreate(GRID_LONLAT, 1);
gridDefXsize(gridID2, 1);
gridDefYsize(gridID2, 1);
xvals = 0;
yvals = 0;
double xvals = 0, yvals = 0;
gridDefXvals(gridID2, &xvals);
gridDefYvals(gridID2, &yvals);
for ( i = 0; i < ngrids; i++ )
for ( int i = 0; i < ngrids; i++ )
vlistChangeGridIndex(vlistID2, i, gridID2);
/* eigenvectors */
......@@ -524,7 +516,7 @@ void *EOFs(void * argument)
if ( eofdata[varID][levelID].first_call )
{
eofdata[varID][levelID].first_call = FALSE;
eofdata[varID][levelID].first_call = false;
if ( cdoVerbose )
cdoPrint("Calculating covar matrices for %i levels of var%i (%s)", nlevs, varID, vname);
......@@ -543,10 +535,11 @@ void *EOFs(void * argument)
covar = eofdata[varID][levelID].covar;
for ( ipack = 0; ipack < npack; ++ipack )
for ( int ipack = 0; ipack < npack; ++ipack )
{
i = pack[ipack];
for ( jpack = 0; jpack < npack; ++jpack)
int j;
int i = pack[ipack];
for ( int jpack = 0; jpack < npack; ++jpack )
{
if ( jpack < ipack )
{
......@@ -570,7 +563,7 @@ void *EOFs(void * argument)
covar_array = (double *) Malloc(nts*nts*sizeof(double));
covar = (double **) Malloc(nts*sizeof(double *));
for ( i = 0; i < nts; ++i ) covar[i] = covar_array + nts*i;
for ( int i = 0; i < nts; ++i ) covar[i] = covar_array + nts*i;
eig_val = (double *) Malloc(nts*sizeof(double));
eofdata[varID][levelID].eig_val = eig_val;
......@@ -578,17 +571,17 @@ void *EOFs(void * argument)
eofdata[varID][levelID].covar = covar;
#if defined(_OPENMP)
#pragma omp parallel for private(j1, j2, i, sum) default(shared) schedule(dynamic)
#pragma omp parallel for default(shared) schedule(dynamic)
#endif
for ( j1 = 0; j1 < nts; j1++ )
for ( int j1 = 0; j1 < nts; j1++ )
{
for ( j2 = 0; j2 < j1; j2++ ) covar[j1][j2] = covar[j2][j1];
for ( j2 = j1; j2 < nts; j2++ )
double *df1p = data[j1];
for ( int j2 = 0; j2 < j1; j2++ ) covar[j1][j2] = covar[j2][j1];
for ( int j2 = j1; j2 < nts; j2++ )
{
sum = 0;
double *df1p = data[j1];
double *df2p = data[j2];
for ( i = 0; i < npack; i++ )
double sum = 0;
for ( int i = 0; i < npack; i++ )
sum += weight[pack[i]]*df1p[i]*df2p[i];
covar[j1][j2] = sum / sum_w / nts;
}
......@@ -612,9 +605,9 @@ void *EOFs(void * argument)
if ( cdoTimer ) timer_stop(timer_eig);
/* NOW: covar contains the eigenvectors, eig_val the eigenvalues */
for ( i = 0; i < gridsize; ++i ) out[i] = missval;
for ( int i = 0; i < gridsize; ++i ) out[i] = missval;
// for ( i = 0; i < n; i++ ) eig_val[i] *= sum_w;
// for ( int i = 0; i < n; i++ ) eig_val[i] *= sum_w;
} // first_call
else
{
......@@ -628,7 +621,7 @@ void *EOFs(void * argument)
else if ( time_space ) scale_eigvec_time(out, tsID, nts, npack, pack, weight, covar, data, missval, sum_w);
nmiss = 0;
for ( i = 0; i < gridsize; i++ ) if ( DBL_IS_EQUAL(out[i], missval) ) nmiss++;
for ( int i = 0; i < gridsize; i++ ) if ( DBL_IS_EQUAL(out[i], missval) ) nmiss++;
streamDefRecord(streamID3, varID, levelID);
streamWriteRecord(streamID3, out, nmiss);
......
......@@ -50,24 +50,20 @@ void *EOF3d(void * argument)
{
enum {EOF3D_, EOF3D_TIME, EOF3D_SPATIAL};
int temp_size = 0;
int i, i2, j, j1, j2, eofID, varID, levelID, tsID;
int missval_warning=0;
int nmiss,ngrids,n=0,nlevs=0,npack=0,nts=0;
size_t temp_size = 0, npack = 0;
int i, eofID, varID, levelID, tsID;
int missval_warning = 0;
int nmiss, ngrids, n = 0, nlevs = 0, nts = 0;
int offset;
int timer_cov = 0, timer_eig = 0;
int *varID2;
int calendar = CALENDAR_STANDARD;
juldate_t juldate;
double missval=0;
double sum_w, sum;
double sum_w;
double **cov = NULL; /* TODO: covariance matrix / eigenvectors after solving */
double *eigv;
double *xvals, *yvals, *zvals;
double *df1p, *df2p;
if ( cdoTimer )
{
......@@ -84,7 +80,7 @@ void *EOF3d(void * argument)
int operfunc = cdoOperatorF1(operatorID);
operatorInputArg("Number of eigen functions to write out");
int n_eig = parameter2int(operatorArgv()[0]);
int n_eig = parameter2int(operatorArgv()[0]);
enum T_EIGEN_MODE eigen_mode = get_eigenmode();
enum T_WEIGHT_MODE weight_mode = get_weightmode();
......@@ -97,7 +93,7 @@ void *EOF3d(void * argument)
int nrecs;
double *weight = (double *) Malloc(gridsize*sizeof(double));
for ( i = 0; i < gridsize; ++i ) weight[i] = 1.;
for ( int i = 0; i < gridsize; ++i ) weight[i] = 1.;
if ( weight_mode == WEIGHT_ON )
{
......@@ -130,6 +126,8 @@ void *EOF3d(void * argument)
nts = tsID;
if ( cdoVerbose ) cdoPrint("Counted %i timeSteps", nts);
}
else
if ( cdoVerbose ) cdoPrint("Found %i timeSteps", nts);
streamClose(streamID1);
......@@ -161,7 +159,7 @@ void *EOF3d(void * argument)
{
gridsize = vlistGridsizeMax(vlistID1);
nlevs = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
temp_size = gridsize * nlevs;
temp_size = ((size_t)gridsize) * nlevs;
missval = vlistInqVarMissval(vlistID1, varID);
datacounts[varID] = (int*) Malloc(nlevs*sizeof(int));
......@@ -170,10 +168,10 @@ void *EOF3d(void * argument)
for ( tsID = 0; tsID < nts; tsID++ )
{
datafields[varID][tsID] = (double *) Malloc(temp_size*sizeof(double));
for ( i = 0; i < temp_size; ++i ) datafields[varID][tsID][i] = 0;
for ( size_t i = 0; i < temp_size; ++i ) datafields[varID][tsID][i] = 0;
}
datacounts[varID] = (int *) Malloc(temp_size*sizeof(int));
for( i = 0; i < temp_size; i++) datacounts[varID][i] = 0;
for( size_t i = 0; i < temp_size; i++) datacounts[varID][i] = 0;
eigenvectors[varID] = (double **) Malloc(n_eig*sizeof(double *));
eigenvalues[varID] = (double **) Malloc(nts*sizeof(double *));
......@@ -183,7 +181,7 @@ void *EOF3d(void * argument)
if ( i < n_eig )
{
eigenvectors[varID][i] = (double *) Malloc(temp_size*sizeof(double));
for ( i2 = 0; i2 < temp_size; ++i2 )
for ( size_t i2 = 0; i2 < temp_size; ++i2 )
eigenvectors[varID][i][i2] = missval;
}
......@@ -225,7 +223,7 @@ void *EOF3d(void * argument)
{
if ( missval_warning == 0 )
{
cdoWarning("Missing Value Support not Checked for this Operator!");
cdoWarning("Missing Value Support not checked for this Operator!");
cdoWarning("Does not work with changing locations of missing values in time.");
missval_warning = 1;
}
......@@ -244,8 +242,8 @@ void *EOF3d(void * argument)
for ( varID = 0; varID < nvars; varID++ )
{
gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
nlevs = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
temp_size = gridsize * nlevs;
nlevs = zaxisInqSize(vlistInqVarZaxis(vlistID1, varID));
temp_size = ((size_t)gridsize) * nlevs;
if ( cdoVerbose ) {
char vname[64];
......@@ -258,9 +256,9 @@ void *EOF3d(void * argument)
if ( cdoTimer ) timer_start(timer_cov);
for ( i = 0; i < temp_size ; i++ )
for ( size_t i = 0; i < temp_size ; i++ )
{
if ( datacounts[varID][i] > 1)
if ( datacounts[varID][i] > 1 )
{
pack[npack] = i;
npack++;
......@@ -271,7 +269,7 @@ void *EOF3d(void * argument)
if ( weight_mode == WEIGHT_ON )
{
sum_w = 0;
for ( i = 0; i < npack; i++ ) sum_w += weight[pack[i]];
for ( size_t i = 0; i < npack; i++ ) sum_w += weight[pack[i]];
}
if ( npack < 1 ) {
......@@ -283,29 +281,32 @@ void *EOF3d(void * argument)
cov = (double **) Malloc(nts*sizeof(double*));
for ( j1 = 0; j1 < nts; j1++)
for ( int j1 = 0; j1 < nts; j1++)
cov[j1] = (double *) Malloc(nts*sizeof(double));
eigv = (double *) Malloc(n*sizeof(double));
if ( cdoVerbose ) {
cdoPrint("varID %i allocated eigv and cov with nts=%i and n=%i",varID,nts,n);
cdoPrint(" npack=%i, nts=%i temp_size=%i",npack,nts,temp_size);
}
if ( cdoVerbose )
{
cdoPrint("varID %i allocated eigv and cov with nts=%i and n=%i", varID, nts, n);
cdoPrint(" npack=%zu, nts=%i temp_size=%zu", npack, nts, temp_size);
}
#if defined(_OPENMP)
#pragma omp parallel for private(j1,j2,sum,df1p,df2p) default(shared) schedule(static,2000)
#pragma omp parallel for default(shared) schedule(static,2000)
#endif
for ( j1 = 0; j1 < nts; j1++)
for ( j2 = j1; j2 < nts; j2++ )
{
sum = 0;
df1p = datafields[varID][j1];
df2p = datafields[varID][j2];
for ( i = 0; i < npack; i++ )
sum += weight[pack[i]%gridsize]*df1p[pack[i]]*df2p[pack[i]];
cov[j2][j1] = cov[j1][j2] = sum / sum_w / nts;
}
for ( int j1 = 0; j1 < nts; j1++ )
{
double *df1p = datafields[varID][j1];
for ( int j2 = j1; j2 < nts; j2++ )
{
double *df2p = datafields[varID][j2];
double sum = 0;
for ( size_t i = 0; i < npack; i++ )
sum += weight[pack[i]%gridsize]*df1p[pack[i]]*df2p[pack[i]];
cov[j2][j1] = cov[j1][j2] = sum / sum_w / nts;
}
}
if ( cdoVerbose ) cdoPrint("calculated cov-matrix");
......@@ -316,7 +317,7 @@ void *EOF3d(void * argument)
if ( cdoTimer ) timer_start(timer_eig);
if ( cdoVerbose )
cdoPrint("Processed correlation matrix for var %2i | npack: %4i",varID,n);
cdoPrint("Processed correlation matrix for var %2i | npack: %zu", varID, n);
if ( eigen_mode == JACOBI )
parallel_eigen_solution_of_symmetric_matrix(cov, eigv, n, __func__);
......@@ -337,23 +338,24 @@ void *EOF3d(void * argument)
double *eigenvec = eigenvectors[varID][eofID];
#if defined(_OPENMP)
#pragma omp parallel for default(none) private(j,sum) shared(varID,nts,eofID,npack,pack,cov,datafields,eigenvec)
#pragma omp parallel for default(none) shared(varID,nts,eofID,npack,pack,cov,datafields,eigenvec)
#endif
for ( i = 0; i < npack; i++ )
for ( size_t i = 0; i < npack; i++ )
{
sum = 0;
for ( j = 0; j < nts; j++ )
double sum = 0;
for ( int j = 0; j < nts; j++ )
sum += datafields[varID][j][pack[i]] * cov[eofID][j];
eigenvec[pack[i]] = sum;
}
// NORMALIZING
sum = 0;
double sum = 0;
#if defined(_OPENMP)
#pragma omp parallel for default(none) shared(eigenvec,weight,pack,npack,gridsize) reduction(+:sum)
#endif
for ( i = 0; i < npack; i++ )
for ( size_t i = 0; i < npack; i++ )
sum += weight[pack[i]%gridsize] *
eigenvec[pack[i]] * eigenvec[pack[i]];
......@@ -363,7 +365,7 @@ void *EOF3d(void * argument)
#if defined(_OPENMP)
#pragma omp parallel for default(none) shared(sum,npack,eigenvec,pack)
#endif
for( i = 0; i < npack; i++ )
for ( size_t i = 0; i < npack; i++ )
eigenvec[pack[i]] /= sum;
}
else
......@@ -371,7 +373,7 @@ void *EOF3d(void * argument)
#if defined(_OPENMP)
#pragma omp parallel for default(none) shared(eigenvec,pack,missval,npack)
#endif
for( i = 0; i < npack; i++ )
for( size_t i = 0; i < npack; i++ )
eigenvec[pack[i]] = missval;
}
} /* for ( eofID = 0; eofID < n_eig; eofID++ ) */
......@@ -385,36 +387,32 @@ void *EOF3d(void * argument)
/* write files with eigenvalues (ID3) and eigenvectors (ID2) */
/* eigenvalues */
int streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
int streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
int taxisID2 = taxisDuplicate(taxisID1);
int taxisID2 = taxisDuplicate(taxisID1);
int gridID2 = gridCreate(GRID_LONLAT, 1);
int gridID2 = gridCreate(GRID_LONLAT, 1);
gridDefXsize(gridID2, 1);
gridDefYsize(gridID2, 1);
xvals = (double*) Malloc(1*sizeof(double));
yvals = (double*) Malloc(1*sizeof(double));
zvals = (double*) Malloc(1*sizeof(double));
xvals[0] = 0;
yvals[0] = 0;
zvals[0] = 0;
gridDefXvals(gridID2, xvals);
gridDefYvals(gridID2, yvals);
int zaxisID2 = zaxisCreate(ZAXIS_GENERIC,1);
zaxisDefLevels(zaxisID2,zvals);
zaxisDefName(zaxisID2,"zaxis_Reduced");
zaxisDefLongname(zaxisID2,"Reduced zaxis from EOF3D - only one eigen value per 3D eigen vector");
double xvals = 0, yvals = 0;
gridDefXvals(gridID2, &xvals);
gridDefYvals(gridID2, &yvals);
int zaxisID2 = zaxisCreate(ZAXIS_GENERIC, 1);
double zvals = 0;
zaxisDefLevels(zaxisID2, &zvals);
zaxisDefName(zaxisID2, "zaxis_Reduced");
zaxisDefLongname(zaxisID2, "Reduced zaxis from EOF3D - only one eigen value per 3D eigen vector");
int vlistID2 = vlistCreate();
taxisDefRdate(taxisID2, 0);
taxisDefRtime(taxisID2, 0);
vlistDefTaxis(vlistID2, taxisID2);
varID2 = (int*) Malloc(nvars*sizeof(int));
int *varID2 = (int*) Malloc(nvars*sizeof(int));
for ( varID=0; varID<nvars; varID++ )
varID2[varID] = vlistDefVar(vlistID2, gridID2, zaxisID2, TSTEP_INSTANT);
ngrids = vlistNgrids(vlistID2);
ngrids = vlistNgrids(vlistID2);
for ( i = 0; i < ngrids; i++ )
vlistChangeGridIndex(vlistID2, i, gridID2);
......@@ -473,9 +471,9 @@ void *EOF3d(void * argument)
for ( varID = 0; varID < nvars; varID++)
{
for( i = 0; i < nts; i++)
for ( i = 0; i < nts; i++)
{
Free(datafields[varID][tsID]);
Free(datafields[varID][i]);
if ( i < n_eig )
Free(eigenvectors[varID][i]);
Free(eigenvalues[varID][i]);
......@@ -492,6 +490,7 @@ void *EOF3d(void * argument)
Free(eigenvectors);
Free(eigenvalues);
Free(in);
Free(varID2);
Free(pack);
Free(weight);
......
......@@ -84,7 +84,7 @@ void *Runstat(void *argument)
vlistDefTaxis(vlistID2, taxisID2);
/* Number of timestep will be reduced compared to the input
* error handling in case of not enough timesteps is done per record */
vlistDefNtsteps(vlistID2,vlistNtsteps(vlistID1)-ndates+1);
vlistDefNtsteps(vlistID2, vlistNtsteps(vlistID1)-ndates+1);
int streamID2 = streamOpenWrite(cdoStreamName(1), cdoFiletype());
......
Supports Markdown
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