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

Change type of gridsize to size_t.

parent 08fdc2f4
...@@ -179,8 +179,8 @@ paramType *params_new(int vlistID) ...@@ -179,8 +179,8 @@ paramType *params_new(int vlistID)
int zaxisID = vlistInqVarZaxis(vlistID, varID); int zaxisID = vlistInqVarZaxis(vlistID, varID);
int datatype = vlistInqVarDatatype(vlistID, varID); int datatype = vlistInqVarDatatype(vlistID, varID);
int steptype = vlistInqVarTimetype(vlistID, varID); int steptype = vlistInqVarTimetype(vlistID, varID);
int ngp = gridInqSize(gridID); size_t ngp = gridInqSize(gridID);
int nlev = zaxisInqSize(zaxisID); size_t nlev = zaxisInqSize(zaxisID);
double missval = vlistInqVarMissval(vlistID, varID); double missval = vlistInqVarMissval(vlistID, varID);
vlistInqVarName(vlistID, varID, name); vlistInqVarName(vlistID, varID, name);
...@@ -209,7 +209,7 @@ paramType *params_new(int vlistID) ...@@ -209,7 +209,7 @@ paramType *params_new(int vlistID)
} }
static static
void params_add_coord(parse_param_t *parse_arg, int coord, int cdiID, int size, const char *units, const char *longname) void params_add_coord(parse_param_t *parse_arg, int coord, int cdiID, size_t size, const char *units, const char *longname)
{ {
int ncoords = parse_arg->ncoords; int ncoords = parse_arg->ncoords;
if ( ncoords >= parse_arg->maxcoords ) if ( ncoords >= parse_arg->maxcoords )
...@@ -254,7 +254,7 @@ void params_add_coordinates(int vlistID, parse_param_t *parse_arg) ...@@ -254,7 +254,7 @@ void params_add_coordinates(int vlistID, parse_param_t *parse_arg)
for ( int index = 0; index < ngrids; ++index ) for ( int index = 0; index < ngrids; ++index )
{ {
int gridID = vlistGrid(vlistID, index); int gridID = vlistGrid(vlistID, index);
int size = gridInqSize(gridID); size_t size = gridInqSize(gridID);
gridInqXunits(gridID, units); gridInqXunits(gridID, units);
params_add_coord(parse_arg, 'x', gridID, size, units, "longitude"); params_add_coord(parse_arg, 'x', gridID, size, units, "longitude");
gridInqYunits(gridID, units); gridInqYunits(gridID, units);
......
...@@ -108,7 +108,7 @@ typedef struct { ...@@ -108,7 +108,7 @@ typedef struct {
bool needed; bool needed;
int coord; int coord;
int cdiID; int cdiID;
int size; size_t size;
char *units; char *units;
char *longname; char *longname;
double *data; double *data;
......
...@@ -4,14 +4,11 @@ ...@@ -4,14 +4,11 @@
void nospec(int vlistID) void nospec(int vlistID)
{ {
int gridID, gridtype; int nvars = vlistNvars(vlistID);
int varID, nvars; for ( int varID = 0; varID < nvars; varID++ )
nvars = vlistNvars(vlistID);
for ( varID = 0; varID < nvars; varID++ )
{ {
gridID = vlistInqVarGrid(vlistID, varID); int gridID = vlistInqVarGrid(vlistID, varID);
gridtype = gridInqType(gridID); int gridtype = gridInqType(gridID);
if ( gridtype == GRID_SPECTRAL ) if ( gridtype == GRID_SPECTRAL )
cdoAbort("Operator not defined for spectral fields"); cdoAbort("Operator not defined for spectral fields");
} }
......
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