Commit 76ee3782 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

change code/tabnum to param

parent b8eb262e
......@@ -129,6 +129,7 @@ src/cdi.inc -text
src/cdiFortran.c -text
src/cdi_error.c -text
src/cdi_limits.h -text
src/cdi_util.c -text
src/cfortran.doc -text
src/cfortran.h -text
src/cgribex.h -text
......
2009-11-22 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* change code/tabnum to param
2009-11-20 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added function vlistDefVarParam/vlistInqVarParam
......
......@@ -35,8 +35,8 @@
#include "printinfo.h"
void decode_date(int date, int *year, int *month, int *day);
void decode_time(int time, int *hour, int *minute, int *second);
void cdiDecodeDate(int date, int *year, int *month, int *day);
void cdiDecodeTime(int time, int *hour, int *minute, int *second);
int getopt(int argc, char *const argv[], const char *optstring);
......@@ -126,8 +126,8 @@ void printInfo(int gridtype, int date, int time, int code, double level,
/* ----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+ */
}
decode_date(date, &year, &month, &day);
decode_time(time, &hour, &minute, &second);
cdiDecodeDate(date, &year, &month, &day);
cdiDecodeTime(time, &hour, &minute, &second);
fprintf(stdout, "%6d : %4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d %3d %7g ",
++rec, year, month, day, hour, minute, second, code, level);
......@@ -361,8 +361,8 @@ void printShortinfo(int streamID, int vlistID, int vardis)
vdate = taxisInqRdate(taxisID);
vtime = taxisInqRtime(taxisID);
decode_date(vdate, &year, &month, &day);
decode_time(vtime, &hour, &minute, &second);
cdiDecodeDate(vdate, &year, &month, &day);
cdiDecodeTime(vtime, &hour, &minute, &second);
fprintf(stdout, " RefTime = %4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d",
year, month, day, hour, minute, second);
......@@ -422,8 +422,8 @@ void printShortinfo(int streamID, int vlistID, int vardis)
vdate = taxisInqVdate(taxisID);
vtime = taxisInqVtime(taxisID);
decode_date(vdate, &year, &month, &day);
decode_time(vtime, &hour, &minute, &second);
cdiDecodeDate(vdate, &year, &month, &day);
cdiDecodeTime(vtime, &hour, &minute, &second);
fprintf(stdout, " %5.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d",
year, month, day, hour, minute, second);
......
......@@ -380,7 +380,7 @@ int main(int argc, char *argv[])
fmin = 1.e33;
fmax = -1.e33;
fmean = 0;
// for ( int j = 0; j < 4; ++j )
for ( int j = 0; j < 2; ++j )
for ( i = 0; i < gridsize; ++i )
{
if ( data[i] < fmin ) fmin = data[i];
......
......@@ -17,6 +17,7 @@ endif
libcdi_a_SOURCES = \
cdiFortran.c \
cdi_error.c \
cdi_util.c \
taxis.c \
error.c \
version.c \
......
......@@ -62,20 +62,21 @@ ARFLAGS = cru
libcdi_a_AR = $(AR) $(ARFLAGS)
libcdi_a_LIBADD =
am_libcdi_a_OBJECTS = cdiFortran.$(OBJEXT) cdi_error.$(OBJEXT) \
taxis.$(OBJEXT) error.$(OBJEXT) version.$(OBJEXT) \
dmemory.$(OBJEXT) model.$(OBJEXT) institution.$(OBJEXT) \
table.$(OBJEXT) util.$(OBJEXT) varscan.$(OBJEXT) \
calendar.$(OBJEXT) timebase.$(OBJEXT) vlist.$(OBJEXT) \
vlist_var.$(OBJEXT) vlist_att.$(OBJEXT) basetime.$(OBJEXT) \
stream_history.$(OBJEXT) stream_cgribex.$(OBJEXT) \
stream_gribapi.$(OBJEXT) stream_grb.$(OBJEXT) \
stream_cdf.$(OBJEXT) stream_srv.$(OBJEXT) stream_ext.$(OBJEXT) \
stream_ieg.$(OBJEXT) grid.$(OBJEXT) zaxis.$(OBJEXT) \
stream.$(OBJEXT) stream_var.$(OBJEXT) stream_record.$(OBJEXT) \
tsteps.$(OBJEXT) stream_int.$(OBJEXT) servicelib.$(OBJEXT) \
extralib.$(OBJEXT) ieglib.$(OBJEXT) cdf.$(OBJEXT) \
cdf_int.$(OBJEXT) file.$(OBJEXT) binary.$(OBJEXT) \
swap.$(OBJEXT) cgribexlib.$(OBJEXT) gribapi.$(OBJEXT)
cdi_util.$(OBJEXT) taxis.$(OBJEXT) error.$(OBJEXT) \
version.$(OBJEXT) dmemory.$(OBJEXT) model.$(OBJEXT) \
institution.$(OBJEXT) table.$(OBJEXT) util.$(OBJEXT) \
varscan.$(OBJEXT) calendar.$(OBJEXT) timebase.$(OBJEXT) \
vlist.$(OBJEXT) vlist_var.$(OBJEXT) vlist_att.$(OBJEXT) \
basetime.$(OBJEXT) stream_history.$(OBJEXT) \
stream_cgribex.$(OBJEXT) stream_gribapi.$(OBJEXT) \
stream_grb.$(OBJEXT) stream_cdf.$(OBJEXT) stream_srv.$(OBJEXT) \
stream_ext.$(OBJEXT) stream_ieg.$(OBJEXT) grid.$(OBJEXT) \
zaxis.$(OBJEXT) stream.$(OBJEXT) stream_var.$(OBJEXT) \
stream_record.$(OBJEXT) tsteps.$(OBJEXT) stream_int.$(OBJEXT) \
servicelib.$(OBJEXT) extralib.$(OBJEXT) ieglib.$(OBJEXT) \
cdf.$(OBJEXT) cdf_int.$(OBJEXT) file.$(OBJEXT) \
binary.$(OBJEXT) swap.$(OBJEXT) cgribexlib.$(OBJEXT) \
gribapi.$(OBJEXT)
libcdi_a_OBJECTS = $(am_libcdi_a_OBJECTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
......@@ -222,6 +223,7 @@ nodist_include_HEADERS = $(am__append_1)
libcdi_a_SOURCES = \
cdiFortran.c \
cdi_error.c \
cdi_util.c \
taxis.c \
error.c \
version.c \
......@@ -399,6 +401,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf_int.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdiFortran.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_error.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_util.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cgribexlib.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmemory.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Po@am__quote@
......
......@@ -133,7 +133,7 @@ int date_to_calday(int calendar, int date)
dpy = calendar_dpy(calendar);
decode_date(date, &year, &month, &day);
cdiDecodeDate(date, &year, &month, &day);
if ( dpy == 360 || dpy == 365 || dpy == 366 )
calday = encode_day(dpy, year, month, day);
......@@ -157,7 +157,7 @@ int calday_to_date(int calendar, int calday)
else
decode_julday(calendar, calday, &year, &month, &day);
date = encode_date(year, month, day);
date = cdiEncodeDate(year, month, day);
return (date);
}
......@@ -219,8 +219,8 @@ int main(void)
for ( i = 0; i < nmin; i++ )
{
decode_date(vdate0, &year, &mon, &day);
decode_time(vtime0, &hour, &minute, &second);
cdiDecodeDate(vdate0, &year, &mon, &day);
cdiDecodeTime(vtime0, &hour, &minute, &second);
calday = date_to_calday(calendar, vdate0);
secofday = time_to_sec(vtime0);
......@@ -233,8 +233,8 @@ int main(void)
++j, vdate0, vtime0, vdate, vtime, calday, secofday);
year++;
vdate0 = encode_date(year, mon, day);
vtime0 = encode_time(hour, minute, second);
vdate0 = cdiEncodeDate(year, mon, day);
vtime0 = cdiEncodeTime(hour, minute, second);
}
printf("stop time: %8d %4d\n", vdate0, vtime0);
......@@ -252,8 +252,8 @@ int main(void)
secofday = time_to_sec(vtime0);
for ( i = 0; i < nmin; i++ )
{
decode_date(vdate0, &year, &mon, &day);
decode_time(vtime0, &hour, &minute, &second);
cdiDecodeDate(vdate0, &year, &mon, &day);
cdiDecodeTime(vtime0, &hour, &minute, &second);
if ( ++minute >= 60 )
{
......@@ -273,8 +273,8 @@ int main(void)
}
}
vdate0 = encode_date(year, mon, day);
vtime0 = encode_time(hour, minute, second);
vdate0 = cdiEncodeDate(year, mon, day);
vtime0 = cdiEncodeTime(hour, minute, second);
julday_add_seconds(ijulinc, &calday, &secofday);
......
......@@ -9,6 +9,7 @@ extern "C" {
#define CDI_UNDEFID -1
#define CDI_GLOBAL -1 /* Global var ID for vlist */
#define CDI_UNDEFPARAM 2147483647
/* Byte order */
......@@ -172,6 +173,23 @@ void cdiDefMissval(double missval);
double cdiInqMissval(void);
void cdiDefGlobal(const char *string, int val);
/* CDI converter routines */
/* param format: DDDCCCNNN */
void cdiDecodeParam(int param, int *dis, int *cat, int *num);
int cdiEncodeParam(int dis, int cat, int num);
/* date format: YYYYMMDD */
/* time format: hhmmss */
void cdiDecodeDate(int date, int *year, int *month, int *day);
int cdiEncodeDate(int year, int month, int day);
void cdiDecodeTime(int time, int *hour, int *minute, int *second);
int cdiEncodeTime(int hour, int minute, int second);
/* STREAM control routines */
/* streamOpenRead: Open a dataset for reading */
......@@ -397,7 +415,7 @@ int vlistInqVarTimave(int vlistID, int varID);
void vlistDefVarTimaccu(int vlistID, int varID, int timaccu);
int vlistInqVarTimaccu(int vlistID, int varID);
int vlistInqVarSize(int vlistID, int varID);
int vlistInqVarID(int vlistID, int code);
int vlistInqVarID(int vlistID, int param);
void vlistDefIndex(int vlistID, int varID, int levID, int index);
int vlistInqIndex(int vlistID, int varID, int levID);
......
void cdiDecodeParam(int param, int *pdis, int *pcat, int *pnum)
{
int iparam;
iparam = param;
if ( param < 0 ) iparam = -iparam;
*pdis = iparam / 1000000;
iparam = iparam - *pdis*1000000;
*pcat = iparam / 1000;
*pnum = iparam - *pcat*1000;
if ( param < 0 ) *pnum = -(*pnum);
}
int cdiEncodeParam(int pdis, int pcat, int pnum)
{
int param;
int inum;
inum = pnum;
if ( pnum < 0 ) inum = -pnum;
param = pdis*1000000 + pcat*1000 + inum;
if ( pnum < 0 ) param = -param;
return (param);
}
void cdiDecodeDate(int date, int *year, int *month, int *day)
{
int idate;
*year = date / 10000;
idate = date - *year*10000;
if ( idate < 0 ) idate = -idate;
*month = idate / 100;
*day = idate - *month*100;
}
int cdiEncodeDate(int year, int month, int day)
{
int date;
int iyear;
iyear = year;
if ( iyear < 0 ) iyear = -iyear;
date = iyear*10000 + month*100 + day;
if ( year < 0 ) date = -date;
return (date);
}
void cdiDecodeTime(int time, int *hour, int *minute, int *second)
{
int itime;
*hour = time / 10000;
itime = time - *hour*10000;
*minute = itime / 100;
*second = itime - *minute*100;
}
int cdiEncodeTime(int hour, int minute, int second)
{
int time;
time = hour*10000 + minute*100 + second;
return (time);
}
......@@ -1003,7 +1003,7 @@ int gribRefDate(int *isec1)
rmonth = ISEC1_Month;
rday = ISEC1_Day;
date = encode_date(ryear, rmonth, rday);
date = cdiEncodeDate(ryear, rmonth, rday);
return (date) ;
}
......@@ -1016,7 +1016,7 @@ int gribRefTime(int *isec1)
rhour = ISEC1_Hour;
rminute = ISEC1_Minute;
time = encode_time(rhour, rminute, 0);
time = cdiEncodeTime(rhour, rminute, 0);
return (time) ;
}
......@@ -1114,8 +1114,8 @@ void gribDateTime(int *isec1, int *date, int *time)
/*
printf("new %d/%d/%d %d:%d\n", ryear, rmonth, rday, rhour, rminute);
*/
*date = encode_date(ryear, rmonth, rday);
*time = encode_time(rhour, rminute, 0);
*date = cdiEncodeDate(ryear, rmonth, rday);
*time = cdiEncodeTime(rhour, rminute, 0);
return;
}
......
......@@ -95,6 +95,7 @@ c="dmemory.c \
zaxis.c \
cdf_int.c \
cdi_error.c \
cdi_util.c \
stream_int.c \
stream.c \
stream_history.c \
......
......@@ -244,8 +244,8 @@ int splitBasetime(const char *timeunits, TAXIS *taxis)
}
}
rdate = encode_date(year, month, day);
rtime = encode_time(hour, minute, second);
rdate = cdiEncodeDate(year, month, day);
rtime = cdiEncodeTime(hour, minute, second);
(*taxis).rdate = rdate;
(*taxis).rtime = rtime;
......@@ -755,7 +755,7 @@ void cdfDefTimeValue(int streamID, int tsID)
index = tsID;
timevalue = encode_timeval(taxis->vdate, taxis->vtime, &streamptr->tsteps[0].taxis);
timevalue = cdiEncodeTimeval(taxis->vdate, taxis->vtime, &streamptr->tsteps[0].taxis);
if ( CDI_Debug ) Message(func, "tsID = %d timevalue = %f", tsID, timevalue);
ncvarid = streamptr->basetime.ncvarid;
......@@ -767,11 +767,11 @@ void cdfDefTimeValue(int streamID, int tsID)
ncvarid = streamptr->basetime.ncvarboundsid;
timevalue = encode_timeval(taxis->vdate_lb, taxis->vtime_lb, &streamptr->tsteps[0].taxis);
timevalue = cdiEncodeTimeval(taxis->vdate_lb, taxis->vtime_lb, &streamptr->tsteps[0].taxis);
start[0] = tsID; count[0] = 1; start[1] = 0; count[1] = 1;
cdf_put_vara_double(fileID, ncvarid, start, count, &timevalue);
timevalue = encode_timeval(taxis->vdate_ub, taxis->vtime_ub, &streamptr->tsteps[0].taxis);
timevalue = cdiEncodeTimeval(taxis->vdate_ub, taxis->vtime_ub, &streamptr->tsteps[0].taxis);
start[0] = tsID; count[0] = 1; start[1] = 1; count[1] = 1;
cdf_put_vara_double(fileID, ncvarid, start, count, &timevalue);
}
......@@ -851,8 +851,8 @@ void cdfDefTime(int streamID)
rtime = taxis->vtime;
}
decode_date(rdate, &year, &month, &day);
decode_time(rtime, &hour, &minute, &second);
cdiDecodeDate(rdate, &year, &month, &day);
cdiDecodeTime(rtime, &hour, &minute, &second);
if ( timeunit == TUNIT_QUARTER ) timeunit = TUNIT_MINUTE;
sprintf(unitstr, "%s since %d-%02d-%02d %02d:%02d:%02d",
......@@ -6027,7 +6027,7 @@ int cdfInqTimestep(int streamID, int tsID)
index = tsID;
cdf_get_var1_double(fileID, nctimevarid, &index, &timevalue);
decode_timeval(timevalue, taxis, &taxis->vdate, &taxis->vtime);
cdiDecodeTimeval(timevalue, taxis, &taxis->vdate, &taxis->vtime);
nctimeboundsid = streamptr->basetime.ncvarboundsid;
if ( nctimeboundsid != UNDEFID )
......@@ -6036,12 +6036,12 @@ int cdfInqTimestep(int streamID, int tsID)
start[0] = tsID; count[0] = 1; start[1] = 0; count[1] = 1;
cdf_get_vara_double(fileID, nctimeboundsid, start, count, &timevalue);
decode_timeval(timevalue, taxis, &taxis->vdate_lb, &taxis->vtime_lb);
cdiDecodeTimeval(timevalue, taxis, &taxis->vdate_lb, &taxis->vtime_lb);
start[0] = tsID; count[0] = 1; start[1] = 1; count[1] = 1;
cdf_get_vara_double(fileID, nctimeboundsid, start, count, &timevalue);
decode_timeval(timevalue, taxis, &taxis->vdate_ub, &taxis->vtime_ub);
cdiDecodeTimeval(timevalue, taxis, &taxis->vdate_ub, &taxis->vtime_ub);
}
}
}
......
This diff is collapsed.
......@@ -27,7 +27,7 @@
typedef struct {
int code;
int param;
int level;
} EXTCOMPVAR;
......@@ -62,7 +62,7 @@ int extInqRecord(int streamID, int *varID, int *levelID)
static char func[] = "extInqRecord";
int status;
int fileID;
int icode, ilevel;
int iparam, ilevel;
int zaxisID = -1;
int header[4];
int vlistID;
......@@ -85,12 +85,12 @@ int extInqRecord(int streamID, int *varID, int *levelID)
extInqHeader(extp, header);
icode = header[1];
iparam = header[1];
ilevel = header[2];
*varID = vlistInqVarID(vlistID, icode);
*varID = vlistInqVarID(vlistID, iparam);
if ( *varID == UNDEFID ) Error(func, "code %d undefined", icode);
if ( *varID == UNDEFID ) Error(func, "param %d undefined", iparam);
zaxisID = vlistInqVarZaxis(vlistID, *varID);
......@@ -214,7 +214,7 @@ int extDefRecord(int streamID)
extp = streamptr->record->extp;
header[0] = streamptr->record->date;
header[1] = streamptr->record->code;
header[1] = streamptr->record->param;
header[2] = streamptr->record->level;
header[3] = gridInqSize(gridID);
......@@ -250,7 +250,7 @@ int extWriteRecord(int streamID, const double *data)
return (status);
}
void extAddRecord(int streamID, int code, int level, int xysize,
void extAddRecord(int streamID, int param, int level, int xysize,
long recsize, off_t position, int prec)
{
static char func[] = "extAddRecord";
......@@ -273,7 +273,7 @@ void extAddRecord(int streamID, int code, int level, int xysize,
(*record).size = recsize;
(*record).position = position;
(*record).code = code;
(*record).param = param;
(*record).ilevel = level;
memset(&grid, 0, sizeof(grid_t));
......@@ -292,8 +292,8 @@ void extAddRecord(int streamID, int code, int level, int xysize,
datatype = extInqDatatype(prec);
varAddRecord(recID, code, gridID, leveltype, 0, level, 0,
datatype, &varID, &levelID, 0, 0, 0, NULL, NULL, NULL);
varAddRecord(recID, param, gridID, leveltype, 0, level, 0,
datatype, &varID, &levelID, 0, 0, NULL, NULL, NULL);
(*record).varID = varID;
(*record).levelID = levelID;
......@@ -307,7 +307,7 @@ void extAddRecord(int streamID, int code, int level, int xysize,
}
void extCmpRecord(int streamID, int tsID, int recID, off_t position, int code,
void extCmpRecord(int streamID, int tsID, int recID, off_t position, int param,
int level, int xysize)
{
static char func[] = "extCmpRecord";
......@@ -320,7 +320,7 @@ void extCmpRecord(int streamID, int tsID, int recID, off_t position, int code,
record = &streamptr->tsteps[tsID].records[recID];
if ( code != (*record).code || level != (*record).ilevel )
if ( param != (*record).param || level != (*record).ilevel )
Error(func, "inconsistent timestep");
(*record).position = position;
......@@ -346,7 +346,7 @@ void extScanTimestep1(int streamID)
int status;
int fileID;
int rxysize = 0;
int rcode = 0, rlevel = 0, vdate = 0, vtime = 0;
int rparam = 0, rlevel = 0, vdate = 0, vtime = 0;
DateTime datetime, datetime0;
int tsID;
int varID;
......@@ -392,7 +392,7 @@ void extScanTimestep1(int streamID)
prec = extp->dprec;
vdate = header[0];
vtime = 0;
rcode = header[1];
rparam = header[1];
rlevel = header[2];
rxysize = header[3];
......@@ -405,26 +405,26 @@ void extScanTimestep1(int streamID)
{
datetime.date = vdate;
datetime.time = vtime;
compVar.code = rcode;
compVar.param = rparam;
compVar.level = rlevel;
for ( recID = 0; recID < nrecs; recID++ )
{
compVar0.code = streamptr->tsteps[0].records[recID].code;
compVar0.param = streamptr->tsteps[0].records[recID].param;
compVar0.level = streamptr->tsteps[0].records[recID].ilevel;
if ( memcmp(&compVar0, &compVar, sizeof(EXTCOMPVAR)) == 0 ) break;
}
if ( recID < nrecs ) break;
if ( memcmp(&datetime, &datetime0, sizeof(DateTime)) )
Warning(func, "Inconsistent verification time for code %d level %d", rcode, rlevel);
Warning(func, "Inconsistent verification time for param %d level %d", rparam, rlevel);
}
nrecs++;
if ( CDI_Debug )
Message(func, "%4d%8d%4d%8d%8d%6d", nrecs, (int)recpos, rcode, rlevel, vdate, vtime);
Message(func, "%4d%8d%4d%8d%8d%6d", nrecs, (int)recpos, rparam, rlevel, vdate, vtime);
extAddRecord(streamID, rcode, rlevel, rxysize, recsize, recpos, prec);
extAddRecord(streamID, rparam, rlevel, rxysize, recsize, recpos, prec);
}
streamptr->rtsteps = 1;
......@@ -485,7 +485,7 @@ int extScanTimestep2(int streamID)
int status;
int fileID;
int rxysize = 0;
int rcode = 0, rlevel = 0, vdate = 0, vtime = 0;
int rparam = 0, rlevel = 0, vdate = 0, vtime = 0;
int tsID;
int varID;
long recsize;
......@@ -548,7 +548,7 @@ int extScanTimestep2(int streamID)
vdate = header[0];
vtime = 0;
rcode = header[1];
rparam = header[1];
rlevel = header[2];
rxysize = header[3];
......@@ -559,12 +559,12 @@ int extScanTimestep2(int streamID)
taxis->vtime = vtime;
}
compVar.code = rcode;
compVar.param = rparam;
compVar.level = rlevel;
nextstep = FALSE;
for ( recID = 0; recID < nrecords; recID++ )
{
compVar0.code = streamptr->tsteps[tsID].records[recID].code;
compVar0.param = streamptr->tsteps[tsID].records[recID].param;
compVar0.level = streamptr->tsteps[tsID].records[recID].ilevel;
if ( memcmp(&compVar0, &compVar, sizeof(EXTCOMPVAR)) == 0 )
......@@ -583,25 +583,25 @@ int extScanTimestep2(int streamID)
}
if ( recID == nrecords )
{
Warning(func, "code %d level %d not found at timestep %d", rcode, rlevel, tsID+1);
Warning(func, "param %d level %d not found at timestep %d", rparam, rlevel, tsID+1);
return (CDI_EUFSTRUCT);
}
if ( nextstep ) break;
if ( CDI_Debug )
Message(func, "%4d%8d%4d%8d%8d%6d", rindex+1, (int)recpos, rcode, rlevel, vdate, vtime);
Message(func, "%4d%8d%4d%8d%8d%6d", rindex+1, (int)recpos, rparam, rlevel, vdate, vtime);
streamptr->tsteps[tsID].records[recID].size = recsize;
compVar0.code = streamptr->tsteps[tsID].records[recID].code;
compVar0.param = streamptr->tsteps[tsID].records[recID].param;
compVar0.level = streamptr->tsteps[tsID].records[recID].ilevel;
if ( memcmp(&compVar0, &compVar, sizeof(EXTCOMPVAR)) != 0 )
{