Commit 1e82bbf9 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

stream_new_var: changed argument type to stream_t

parent a331774b
......@@ -2209,10 +2209,9 @@ void streamDefVlist(int streamID, int vlistID)
{
gridID = vlistInqVarGrid(vlistID, varID);
zaxisID = vlistInqVarZaxis(vlistID, varID);
streamNewVar(streamID, gridID, zaxisID);
stream_new_var(streamptr, gridID, zaxisID);
if ( streamptr->have_missval )
vlistDefVarMissval(streamptr->vlistID, varID,
vlistInqVarMissval(vlistID, varID));
vlistDefVarMissval(streamptr->vlistID, varID, vlistInqVarMissval(vlistID, varID));
}
if (namespaceHasLocalFile(namespaceGetActive())
......
......@@ -6048,7 +6048,7 @@ void define_all_vars(int streamID, int vlistID, int instID, int modelID, int *va
gridID = ncvars[ncvarid].gridID;
zaxisID = ncvars[ncvarid].zaxisID;
varID = streamNewVar(streamID, gridID, zaxisID);
varID = stream_new_var(streamptr, gridID, zaxisID);
varID = vlistDefVar(vlistID, gridID, zaxisID, ncvars[ncvarid].tsteptype);
#if defined (HAVE_NETCDF4)
......
......@@ -285,7 +285,7 @@ void streamDefineTaxis(int streamID);
int streamsNewEntry(int filetype);
void streamsInitEntry(int streamID);
int streamNewVar(int streamID, int gridID, int zaxisID);
int stream_new_var(stream_t *streamptr, int gridID, int zaxisID);
int tstepsNewEntry(stream_t *streamptr);
......
......@@ -12,12 +12,8 @@
static
void streamvarInitEntry(int streamID, int varID)
void streamvar_init_entry(stream_t *streamptr, int varID)
{
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
streamptr->vars[varID].ncvarid = CDI_UNDEFID;
streamptr->vars[varID].defmiss = 0;
streamptr->vars[varID].nlevs = 0;
......@@ -32,14 +28,11 @@ void streamvarInitEntry(int streamID, int varID)
}
static
int streamvarNewEntry(int streamID)
int streamvar_new_entry(stream_t *streamptr)
{
int varID = 0;
int streamvarSize;
svarinfo_t *streamvar;
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
streamvarSize = streamptr->varsAllocated;
streamvar = streamptr->vars;
......@@ -93,7 +86,7 @@ int streamvarNewEntry(int streamID)
streamptr->varsAllocated = streamvarSize;
streamptr->vars = streamvar;
streamvarInitEntry(streamID, varID);
streamvar_init_entry(streamptr, varID);
streamptr->vars[varID].isUsed = TRUE;
......@@ -101,21 +94,18 @@ int streamvarNewEntry(int streamID)
}
int streamNewVar(int streamID, int gridID, int zaxisID)
int stream_new_var(stream_t *streamptr, int gridID, int zaxisID)
{
int varID;
int *level;
int *lindex;
int nlevs;
int levID;
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
if ( CDI_Debug )
Message("gridID = %d zaxisID = %d", gridID, zaxisID);
varID = streamvarNewEntry(streamID);
varID = streamvar_new_entry(streamptr);
streamptr->nvars++;
......
......@@ -535,7 +535,7 @@ void cdiGenVars(int streamID)
if ( lbounds ) free(dlevels2);
free(dlevels);
varID = streamNewVar(streamID, gridID, zaxisID);
varID = stream_new_var(streamptr, gridID, zaxisID);
varID = vlistDefVar(vlistID, gridID, zaxisID, tsteptype);
vlistDefVarParam(vlistID, varID, param);
......
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