Commit 10a483ce authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

copy, cat: concatenate time constant fields

parent 80e41654
......@@ -109,6 +109,7 @@ doc/tex/mod/Hourpctl -text
doc/tex/mod/Hourstat -text
doc/tex/mod/Hurr -text
doc/tex/mod/Importamsr -text
doc/tex/mod/Importcmsaf -text
doc/tex/mod/Info -text
doc/tex/mod/Input -text
doc/tex/mod/Intgrid -text
......
2008-11-07 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
2008-11-10 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using CDI library version 1.2.1
* New operator: import_cmsaf - import CM-SAF files
* New operator: gengrid - generate grid [request: Michael Boettinger]
* New operator: pow - Power [request: Gil Lizcano]
* New operator: tpnhalo (testversion)
......@@ -8,7 +9,8 @@
* sellonlatbox: add support for grid units 'radians' [request: Jeff Daily]
* sellonlatbox: add support for GRID_CELL [request: Jeff Daily]
* Add option '-u' to determinate whether to overwrite existing files [request: David Wang]
* cat, copy: compare input files
* copy, cat: concatenate time constant fields
* copy, cat: compare input files
* zonvar: activation missing (bug fix) [report: Irene Fischer-Bruns]
* detrend: change taxisCreate to taxisDuplicate [report: Ute Merkel]
* remapdis: add support for GRID_CELL without bounds (full grid search)
......
CDO NEWS
--------
Version 1.2.0 (? August 2008):
Version 1.2.1 (10 November 2008):
* New features:
o Option '-u' to determinate whether to overwrite existing files
* New operators:
o Import CM-SAF files - import_cmsaf
o Mathematical function 'power' - pow
* Changed operators:
o sellonlatbox: add support for grid type 'CELL' and units 'radians'
o remapdis: add support for grid type 'CELL' without bounds (full grid search)
o Timstat: use time axis with bounds from input
o copy, cat: concatenate time constant fields
* Fixed bugs:
o zonvar: activation was missing
o ifthen: bug fix for datasets with different missing values
o runmean: bug fix for datasets with missing values
Version 1.2.0 (13 August 2008):
* New features:
o add support for netCDF4 classic with deflate (option -z zip)
......
......@@ -101,6 +101,7 @@ Strbre Miscellaneous
Strgal Miscellaneous
Hurr Miscellaneous
Importamsr Miscellaneous
Importcmsaf Miscellaneous
EcaCdd Climate indices
EcaCfd Climate indices
EcaCsu Climate indices
......
@BeginModule
@Name = Importcmsaf
@Title = Import CM-SAF files
@Section = Miscellaneous
@Arguments = ifile ofile
@Operators = import_cmsaf
@BeginDescription
This operator imports gridded CM-SAF (Satellite Application Facility on Climate Monitoring)
HDF5 files.
@EndDescription
@EndModule
@BeginOperator_import_cmsaf
@Title = Import CM-SAF files
@BeginDescription
@EndDescription
@EndOperator
@BeginNote
This operator is only available if the program was compiled with HDF5 support!
@EndNote
@BeginExample
To convert a CM-SAF HDF5 file to netCDF use:
@BeginVerbatim
cdo -f nc ifile.h5 ofile.nc
@EndVerbatim
@EndExample
......@@ -33,6 +33,7 @@
#include "cdo_int.h"
#include "pstream.h"
void vlistDefVarTime(int vlistID, int varID, int timeID);
void *Cat(void *argument)
{
......@@ -46,6 +47,7 @@ void *Cat(void *argument)
int lcopy = FALSE;
int gridsize;
int nmiss;
int ntsteps;
double *array = NULL;
cdoInitialize(argument);
......@@ -104,6 +106,15 @@ void *Cat(void *argument)
taxisID2 = taxisDuplicate(taxisID1);
vlistDefTaxis(vlistID2, taxisID2);
ntsteps = vlistNtsteps(vlistID1);
if ( ntsteps == 0 && nfiles > 1 )
{
int nvars = vlistNvars(vlistID1);
for ( varID = 0; varID < nvars; ++varID )
vlistDefVarTime(vlistID2, varID, TIME_VARIABLE);
}
streamDefVlist(streamID2, vlistID2);
}
......
......@@ -29,6 +29,7 @@
#include "cdo_int.h"
#include "pstream.h"
void vlistDefVarTime(int vlistID, int varID, int timeID);
void *Copy(void *argument)
{
......@@ -44,6 +45,7 @@ void *Copy(void *argument)
int nmiss;
int streamCnt, nfiles, indf;
int taxisID1, taxisID2 = CDI_UNDEFID;
int ntsteps;
double *array = NULL;
cdoInitialize(argument);
......@@ -78,6 +80,15 @@ void *Copy(void *argument)
taxisID2 = taxisDuplicate(taxisID1);
vlistDefTaxis(vlistID2, taxisID2);
ntsteps = vlistNtsteps(vlistID1);
if ( ntsteps == 0 && nfiles > 1 )
{
int nvars = vlistNvars(vlistID1);
for ( varID = 0; varID < nvars; ++varID )
vlistDefVarTime(vlistID2, varID, TIME_VARIABLE);
}
streamDefVlist(streamID2, vlistID2);
gridsize = vlistGridsizeMax(vlistID1);
......
......@@ -758,6 +758,8 @@ int pstreamOpenAppend(const char *argument)
cdoDefHistory(fileID, commandLine());
*/
strcpy(filename, argument);
pstreamptr->mode = 'a';
pstreamptr->name = filename;
pstreamptr->fileID = fileID;
}
......
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