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

cdfWriteVarSlice: bug fix swapxy

parent f6f75fce
......@@ -3721,11 +3721,11 @@ int cdfWriteVarSliceDP(int streamID, int varID, int levelID, const double *data,
sdata = (double *) malloc(nvals*sizeof(double));
for ( int j = 0; j < (int)ysize; ++j )
for ( int i = 0; i < (int)xsize; ++i )
sdata[j*xsize+i] = pdata[i*ysize+j];
sdata[i*ysize+j] = pdata[j*xsize+i];
pdata = sdata;
}
cdf_put_vara_double(fileID, ncvarid, start, count, data);
cdf_put_vara_double(fileID, ncvarid, start, count, pdata);
if ( mdata ) free(mdata);
if ( sdata ) free(sdata);
......
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