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

eof: set reference time to 0

parent 4983956a
2010-12-17 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
*eofcoeff: set size of eof_name to 6 (bug fix)
2010-12-16 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de> 2010-12-16 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* import_binary: check for gauss grids only when flag linear=0 * import_binary: check for gauss grids only when flag linear=0
......
...@@ -10,6 +10,8 @@ Version 1.4.7 (?? December 2010): ...@@ -10,6 +10,8 @@ Version 1.4.7 (?? December 2010):
* eca_pd: Precipitation days index per time period * eca_pd: Precipitation days index per time period
* dv2ps: Divergence and vorticity to velocity potential and stream function * dv2ps: Divergence and vorticity to velocity potential and stream function
Fixed bugs: Fixed bugs:
* eof: does not work in previous version
* eofcoeff: does not work in previous version
* fldmean: gives wrong result for grid units [radian] * fldmean: gives wrong result for grid units [radian]
* Yseasstat: bug fix for datasets with time constant fields * Yseasstat: bug fix for datasets with time constant fields
* sellevel: fix problem with hybrid model levels and netCDF output * sellevel: fix problem with hybrid model levels and netCDF output
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Name: cdo Name: cdo
#BuildRequires: #BuildRequires:
Version: 1.4.7rc5 Version: 1.4.7rc6
Release: 1 Release: 1
Summary: Climate Data Operators Summary: Climate Data Operators
License: GNU GENERAL PUBLIC LICENSE Version 2, June 1991 License: GNU GENERAL PUBLIC LICENSE Version 2, June 1991
......
...@@ -133,10 +133,9 @@ void *EOFs(void * argument) ...@@ -133,10 +133,9 @@ void *EOFs(void * argument)
weight = (double*) malloc(gridsize*sizeof(double)); weight = (double*) malloc(gridsize*sizeof(double));
if ( WEIGHTS ) if ( WEIGHTS )
gridWeights(gridID1, &weight[0]); gridWeights(gridID1, &weight[0]);
else else
for(i=0;i<gridsize;i++) for(i=0;i<gridsize;i++) weight[i]=1;
weight[i]=1;
/* eigenvalues */ /* eigenvalues */
...@@ -144,6 +143,8 @@ void *EOFs(void * argument) ...@@ -144,6 +143,8 @@ void *EOFs(void * argument)
if ( streamID2 < 0 ) cdiError(streamID2, "Open failed on %s", cdoStreamName(1)); if ( streamID2 < 0 ) cdiError(streamID2, "Open failed on %s", cdoStreamName(1));
vlistID2 = vlistDuplicate(vlistID1); vlistID2 = vlistDuplicate(vlistID1);
taxisID2 = taxisDuplicate(taxisID1); taxisID2 = taxisDuplicate(taxisID1);
taxisDefRdate(taxisID2, 0);
taxisDefRtime(taxisID2, 0);
vlistDefTaxis(vlistID2, taxisID2); vlistDefTaxis(vlistID2, taxisID2);
gridID2 = gridCreate(GRID_LONLAT, 1); gridID2 = gridCreate(GRID_LONLAT, 1);
gridDefXsize(gridID2, 1); gridDefXsize(gridID2, 1);
...@@ -164,6 +165,8 @@ void *EOFs(void * argument) ...@@ -164,6 +165,8 @@ void *EOFs(void * argument)
vlistID3 = vlistDuplicate(vlistID1); vlistID3 = vlistDuplicate(vlistID1);
taxisID3 = taxisDuplicate(taxisID1); taxisID3 = taxisDuplicate(taxisID1);
gridID3 = gridDuplicate(gridID1); gridID3 = gridDuplicate(gridID1);
taxisDefRdate(taxisID3, 0);
taxisDefRtime(taxisID3, 0);
vlistDefTaxis(vlistID3, taxisID3); vlistDefTaxis(vlistID3, taxisID3);
...@@ -241,7 +244,7 @@ void *EOFs(void * argument) ...@@ -241,7 +244,7 @@ void *EOFs(void * argument)
} }
if ( cdoVerbose ) if ( cdoVerbose )
cdoPrint("Calculating %i eigenvectors and %i eigenvalues in %s\n", cdoPrint("Calculating %i eigenvectors and %i eigenvalues in %s",
n_eig,n,grid_space==1?"grid_space" : "time_space"); n_eig,n,grid_space==1?"grid_space" : "time_space");
if ( cdoTimer ) timer_stop(timer_init); if ( cdoTimer ) timer_stop(timer_init);
...@@ -350,7 +353,6 @@ void *EOFs(void * argument) ...@@ -350,7 +353,6 @@ void *EOFs(void * argument)
for ( recID = 0; recID < nrecs; recID++ ) for ( recID = 0; recID < nrecs; recID++ )
{ {
int i2; int i2;
double tmp;
streamInqRecord(streamID1, &varID, &levelID); streamInqRecord(streamID1, &varID, &levelID);
gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID)); gridsize = gridInqSize(vlistInqVarGrid(vlistID1, varID));
...@@ -518,7 +520,7 @@ void *EOFs(void * argument) ...@@ -518,7 +520,7 @@ void *EOFs(void * argument)
cov[j2][j1] = cov[j1][j2] = sum / sum_w / nts; cov[j2][j1] = cov[j1][j2] = sum / sum_w / nts;
} }
if ( cdoVerbose ) if ( cdoVerbose )
cdoPrint("finished calculation of cov-matrix for var %s\n",&vname[0]); cdoPrint("finished calculation of cov-matrix for var %s",&vname[0]);
} }
...@@ -608,7 +610,7 @@ void *EOFs(void * argument) ...@@ -608,7 +610,7 @@ void *EOFs(void * argument)
if ( cdoTimer ) timer_start(timer_write); if ( cdoTimer ) timer_start(timer_write);
cdoPrint("starting to write results"); if ( cdoVerbose ) cdoPrint("starting to write results");
streamDefVlist(streamID2, vlistID2); streamDefVlist(streamID2, vlistID2);
streamDefVlist(streamID3, vlistID3); streamDefVlist(streamID3, vlistID3);
...@@ -650,13 +652,13 @@ void *EOFs(void * argument) ...@@ -650,13 +652,13 @@ void *EOFs(void * argument)
} }
} }
cdoPrint("stopping timers"); if ( cdoVerbose ) cdoPrint("stopping timers");
if ( cdoTimer ) timer_stop(timer_write); if ( cdoTimer ) timer_stop(timer_write);
if ( cdoTimer ) timer_start(timer_finish); if ( cdoTimer ) timer_start(timer_finish);
cdoPrint("freeing pointers"); if ( cdoVerbose ) cdoPrint("freeing pointers");
for ( varID = 0; varID < nvars; varID++) for ( varID = 0; varID < nvars; varID++)
{ {
......
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