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