Commit 03873527 authored by Karl-Hermann Wieners's avatar Karl-Hermann Wieners
Browse files

[oliver.heidmann] reintegrated changes from cdo-conversion_c++ branch

parents ebccb4b7 b0ba3aee
......@@ -584,6 +584,7 @@ src/interpol.c -text
src/interpol.h -text
src/job.c -text
src/juldate.c -text
src/kdtree.c -text
src/kdtreelib/COPYING.DJ -text
src/kdtreelib/kdtree.h -text
src/kdtreelib/kdtree_cartesian.c -text
......
......@@ -1000,7 +1000,8 @@ void *Gradsdes(void *argument)
if ( operatorID == DUMPMAP )
{
dumpmap();
goto END_LABEL;
cdoFinish();
return (0);
}
if ( operatorArgc() > 1 ) cdoAbort("Too many arguments!");
......
......@@ -165,7 +165,7 @@ int getDate(const char *name)
int date = 0;
char *pname;
pname = strchr(name, '_');
pname = (char *)strchr(name, '_');
if ( pname ) date = atoi(pname+1);
......
......@@ -92,7 +92,7 @@ int y_is_gauss(double *gridyvals, int ysize)
double *yvals, *yw;
yvals = (double*) malloc(ysize*sizeof(double));
yw = (double*) malloc(ysize*sizeof(double));
gaussaw(yvals, yw, ysize);
gaussaw(yvals, yw, (size_t)ysize);
free(yw);
for ( i = 0; i < (int) ysize; i++ )
yvals[i] = asin(yvals[i])/M_PI*180.0;
......@@ -138,7 +138,7 @@ int define_grid(dsets_t *pfi)
if ( pfi->yrflg ) rev_vals(yvals, ny);
if ( pfi->linear[1] == 0 ) lgauss = y_is_gauss(yvals, ny);
if ( pfi->linear[1] == 0 ) lgauss = y_is_gauss(yvals, (size_t)ny);
if ( lgauss ) gridtype = GRID_GAUSSIAN;
else gridtype = GRID_LONLAT;
......@@ -501,21 +501,21 @@ void *Importbinary(void *argument)
/* convert */
if (var_dfrm[recID] == 1) {
unsigned char *carray = (void*)(rec + recoffset);
unsigned char *carray = (unsigned char *)(rec + recoffset);
for (i = 0; i < gridsize; ++i) array[i] = (double) carray[i];
}
else if (var_dfrm[recID] == 2) {
unsigned short *sarray = (void*)(rec + recoffset);
unsigned short *sarray = (unsigned short *)(rec + recoffset);
if (pfi.bswap) gabswp2(sarray, gridsize);
for (i = 0; i < gridsize; ++i) array[i] = (double) sarray[i];
}
else if (var_dfrm[recID] == -2) {
short *sarray = (void*)(rec + recoffset);
short *sarray = (short *)(rec + recoffset);
if (pfi.bswap) gabswp2(sarray, gridsize);
for (i = 0; i < gridsize; ++i) array[i] = (double) sarray[i];
}
else if (var_dfrm[recID] == 4) {
int *iarray = (void*)(rec + recoffset);
int *iarray = (int *)(rec + recoffset);
if (pfi.bswap) gabswp(iarray, gridsize);
for (i = 0; i < gridsize; ++i) array[i] = (double) iarray[i];
}
......
......@@ -85,7 +85,7 @@ void write_data(int streamID, int vlistID, int nvars, double *data[])
static
int getDate(const char *name)
{
char *pname = strchr(name, '_');
char *pname = (char *)strchr(name, '_');
int date = 0;
if ( pname ) date = atoi(pname+1);
......
......@@ -22,6 +22,7 @@
#include <ctype.h>
#include "hetaeta.h"
#include <cdi.h>
#include "cdo.h"
#include "cdo_int.h"
......@@ -29,7 +30,6 @@
#include "after_vertint.h"
#include "list.h"
#include "stdnametable.h"
#include "hetaeta.h"
static
......
......@@ -41,8 +41,8 @@ static
int cmpdatetime(const void *s1, const void *s2)
{
int cmp = 0;
const timeinfo_t *x = s1;
const timeinfo_t *y = s2;
const timeinfo_t *x = (timeinfo_t *)s1;
const timeinfo_t *y = (timeinfo_t *)s2;
/*
printf("%g %g %d %d\n", x->datetime, y->datetime, x, y);
*/
......
......@@ -132,13 +132,13 @@ void *Timselpctl(void *argument)
}
}
int otsID = 0;
if ( tsID < noffset )
{
cdoWarning("noffset is larger than number of timesteps!");
goto LABEL_END;
}
int otsID = 0;
while ( TRUE )
{
nrecs = streamInqTimestep(streamID2, otsID);
......
......@@ -128,13 +128,13 @@ void *Timselstat(void *argument)
}
}
int otsID = 0;
if ( tsID < noffset )
{
cdoWarning("noffset is larger than number of timesteps!");
goto LABEL_END;
}
int otsID = 0;
while ( TRUE )
{
for ( nsets = 0; nsets < ndates; nsets++ )
......
......@@ -34,8 +34,8 @@ static
int cmpdarray(const void *s1, const void *s2)
{
int cmp = 0;
const double *x = s1;
const double *y = s2;
const double *x = (double *)s1;
const double *y = (double *)s2;
if ( *x < *y ) cmp = -1;
else if ( *x > *y ) cmp = 1;
......
......@@ -10,7 +10,7 @@
#define HAVE_OPENMP4 1
#endif
void gaussaw(double *pa, double *pw, int nlat);
void gaussaw(double *pa, double *pw, size_t nlat);
static
void jspleg1(double *pleg, double plat, int ktrunc, double *work)
......
......@@ -55,7 +55,7 @@ void FreeSpectral(struct Variable *vars)
for ( code = MaxCodes-1; code >= 0; --code )
if ( vars[code].spectral )
vars[code].spectral = FreeMemory(vars[code].spectral);
vars[code].spectral = (double *)FreeMemory(vars[code].spectral);
}
static
......@@ -65,7 +65,7 @@ void FreeFourier(struct Variable *vars)
for ( code = 0; code < MaxCodes; code++ )
if ( vars[code].fourier )
vars[code].fourier = FreeMemory(vars[code].fourier);
vars[code].fourier = (double *)FreeMemory(vars[code].fourier);
}
static
......@@ -75,7 +75,7 @@ void FreeHybrid(struct Variable *vars)
for ( code = 0; code < MaxCodes; code++ )
if ( vars[code].hybrid )
vars[code].hybrid = FreeMemory(vars[code].hybrid);
vars[code].hybrid = (double *)FreeMemory(vars[code].hybrid);
}
static
......@@ -85,7 +85,7 @@ void FreeGrid(struct Variable *vars)
for ( code = 0; code < MaxCodes; code++ )
if ( vars[code].grid )
vars[code].grid = FreeMemory(vars[code].grid);
vars[code].grid = (double *)FreeMemory(vars[code].grid);
}
static
......@@ -95,7 +95,7 @@ void FreeSamp(struct Variable *vars)
for ( code = 0; code < MaxCodes; code++ )
if ( vars[code].samp )
vars[code].samp = FreeMemory(vars[code].samp);
vars[code].samp = (int *)FreeMemory(vars[code].samp);
}
/* alloc_dp - Allocate space for double array */
......@@ -464,9 +464,9 @@ void after_FCrh2FCsh(struct Control *globs, struct Variable *vars)
after_GP2FC(vars[HUMIDITY].grid, vars[HUMIDITY].fourier,
globs->Latitudes, globs->Longitudes, vars[HUMIDITY].plev, globs->Fouriers);
vars[HUMIDITY].grid = FreeMemory(vars[HUMIDITY].grid);
vars[RHUMIDITY].grid = FreeMemory(vars[RHUMIDITY].grid);
vars[TEMPERATURE].grid = FreeMemory(vars[TEMPERATURE].grid);
vars[HUMIDITY].grid = (double *)FreeMemory(vars[HUMIDITY].grid);
vars[RHUMIDITY].grid = (double *)FreeMemory(vars[RHUMIDITY].grid);
vars[TEMPERATURE].grid = (double *)FreeMemory(vars[TEMPERATURE].grid);
}
......@@ -492,8 +492,8 @@ void after_SPuv2SPdv(struct Control *globs, struct Variable *vars)
uv2dv(vars[U_WIND].fourier, vars[V_WIND].fourier, Div, Vor,
globs->pol2, globs->pol3, globs->NumLevelRequest, globs->Latitudes, globs->Truncation);
vars[U_WIND].fourier = FreeMemory(vars[U_WIND].fourier);
vars[V_WIND].fourier = FreeMemory(vars[V_WIND].fourier);
vars[U_WIND].fourier = (double *)FreeMemory(vars[U_WIND].fourier);
vars[V_WIND].fourier = (double *)FreeMemory(vars[V_WIND].fourier);
for (i = 0; i < globs->NumLevelRequest; ++i) {
sp2sp(Div, globs->Truncation, DivOut, globs->Truncation);
......@@ -530,9 +530,9 @@ void after_FCsh2FCrh(struct Control *globs, struct Variable *vars)
after_GP2FC(vars[RHUMIDITY].grid, vars[RHUMIDITY].fourier,
globs->Latitudes, globs->Longitudes, vars[RHUMIDITY].plev, globs->Fouriers);
vars[HUMIDITY].grid = FreeMemory(vars[HUMIDITY].grid);
vars[RHUMIDITY].grid = FreeMemory(vars[RHUMIDITY].grid);
vars[TEMPERATURE].grid = FreeMemory(vars[TEMPERATURE].grid);
vars[HUMIDITY].grid = (double *)FreeMemory(vars[HUMIDITY].grid);
vars[RHUMIDITY].grid = (double *)FreeMemory(vars[RHUMIDITY].grid);
vars[TEMPERATURE].grid = (double *)FreeMemory(vars[TEMPERATURE].grid);
}
/* ENDE HUMTEST */
......@@ -1241,7 +1241,7 @@ void after_EchamCompGP(struct Control *globs, struct Variable *vars)
globs->NumLevel, globs->DimGP);
}
if ( globs->unitsel > 2 ) vars[FULL_PRESS].hybrid = FreeMemory(vars[FULL_PRESS].hybrid);
if ( globs->unitsel > 2 ) vars[FULL_PRESS].hybrid = (double *)FreeMemory(vars[FULL_PRESS].hybrid);
if ( vars[THETAF].needed )
{
......@@ -1273,7 +1273,7 @@ void after_EchamCompGP(struct Control *globs, struct Variable *vars)
{
vars[GEOPOTHEIGHT].hlev = globs->NumLevel+1;
vars[GEOPOTHEIGHT].sfit = TRUE;
vars[GEOPOTHEIGHT].hybrid = realloc(vars[GEOPOTHEIGHT].hybrid, (globs->Dim3GP+globs->DimGP)*sizeof(double));
vars[GEOPOTHEIGHT].hybrid = (double *)realloc(vars[GEOPOTHEIGHT].hybrid, (globs->Dim3GP+globs->DimGP)*sizeof(double));
after_copy_array(vars[GEOPOTHEIGHT].hybrid+globs->Dim3GP, globs->Orography, globs->DimGP);
for ( int i = 0; i < globs->DimGP; i++ ) vars[GEOPOTHEIGHT].hybrid[globs->Dim3GP+i] /= PlanetGrav;
}
......@@ -1721,10 +1721,10 @@ void after_processML(struct Control *globs, struct Variable *vars)
}
if ( vars[VORTICITY].spectral && !vars[VORTICITY].needed )
vars[VORTICITY].spectral = FreeMemory(vars[VORTICITY].spectral);
vars[VORTICITY].spectral = (double *)FreeMemory(vars[VORTICITY].spectral);
if ( vars[DIVERGENCE].spectral && !vars[DIVERGENCE].needed )
vars[DIVERGENCE].spectral = FreeMemory(vars[DIVERGENCE].spectral);
vars[DIVERGENCE].spectral = (double *)FreeMemory(vars[DIVERGENCE].spectral);
/* --------------------------- */
/* Output of spectral fields */
......@@ -1768,7 +1768,7 @@ void after_processML(struct Control *globs, struct Variable *vars)
vars[code].hlev, globs->Latitudes, globs->Fouriers, globs->Truncation);
}
if ( code != LNPS )
vars[code].spectral = FreeMemory(vars[code].spectral);
vars[code].spectral = (double *)FreeMemory(vars[code].spectral);
}
/* if (globs->Type < 60) globs->poli = FreeMemory(globs->poli); */
......@@ -1868,7 +1868,7 @@ void after_processML(struct Control *globs, struct Variable *vars)
after_FC2GP(vars[code].fourier,vars[code].hybrid,
globs->Latitudes,globs->Longitudes,vars[code].hlev,globs->Fouriers);
}
vars[code].fourier = FreeMemory(vars[code].fourier);
vars[code].fourier = (double *)FreeMemory(vars[code].fourier);
}
if ( vars[PS_PROG].comp && vars[PS_PROG].hybrid == NULL )
......@@ -2068,7 +2068,7 @@ void after_processML(struct Control *globs, struct Variable *vars)
if ( ! globs->Extrapolate ) vars[code].nmiss = nmiss;
if ( code != TEMPERATURE )
vars[code].hybrid = FreeMemory(vars[code].hybrid);
vars[code].hybrid = (double *)FreeMemory(vars[code].hybrid);
}
}
}
......@@ -2076,7 +2076,7 @@ void after_processML(struct Control *globs, struct Variable *vars)
vars[TEMPERATURE].needed = vars[TEMPERATURE].selected;
FreeHybrid(vars);
if ( vars[HALF_PRESS].hybrid )
vars[HALF_PRESS].hybrid = FreeMemory(vars[HALF_PRESS].hybrid);
vars[HALF_PRESS].hybrid = (double *)FreeMemory(vars[HALF_PRESS].hybrid);
/* -------------------------------- */
/* Output of pressure level grids */
......@@ -2201,8 +2201,8 @@ void after_processML(struct Control *globs, struct Variable *vars)
for ( code = 0; code < MaxCodes; code++ )
if ( vars[code].mean )
{
if ( vars[code].variance ) vars[code].variance = FreeMemory(vars[code].variance);
if ( vars[code].grid ) vars[code].grid = FreeMemory(vars[code].grid);
if ( vars[code].variance ) vars[code].variance = (double *)FreeMemory(vars[code].variance);
if ( vars[code].grid ) vars[code].grid = (double *)FreeMemory(vars[code].grid);
vars[code].grid = vars[code].mean;
vars[code].mean = NULL;
}
......@@ -2229,13 +2229,13 @@ void after_processML(struct Control *globs, struct Variable *vars)
globs->Latitudes, globs->Longitudes, vars[code].plev, globs->Fouriers);
if ( vars[code].grid && (vars[code].sfit || globs->Type < 70) )
vars[code].grid = FreeMemory(vars[code].grid);
vars[code].grid = (double *)FreeMemory(vars[code].grid);
}
}
for (code = 0; code < MaxCodes; code++)
if (vars[code].grid && (vars[code].sfit || globs->Type < 70))
vars[code].grid = FreeMemory(vars[code].grid);
vars[code].grid = (double *)FreeMemory(vars[code].grid);
/* -------------------------- */
/* Output of fourier fields */
......@@ -2348,7 +2348,7 @@ void after_processML(struct Control *globs, struct Variable *vars)
for ( code = 0; code < MaxCodes; code++ )
if ( vars[code].fourier && (vars[code].sfit || globs->Type < 61) )
vars[code].fourier = FreeMemory(vars[code].fourier);
vars[code].fourier = (double *)FreeMemory(vars[code].fourier);
/* --------------------------- */
/* Output of spectral fields */
......
......@@ -126,7 +126,7 @@ int cdo_getopt_internal(int nargc, char * const *nargv, const char *ostr)
}
/* option letter okay? */
if ( (CDO_optopt = (int)*place++) == (int)':' || !(oli = strchr(ostr, CDO_optopt)) )
if ( (CDO_optopt = (int)*place++) == (int)':' || !(oli = (char *)strchr(ostr, CDO_optopt)) )
{
/* if the user didn't specify '-' as an option, assume it means -1. */
if ( CDO_optopt == (int)'-' ) return (-1);
......
......@@ -263,7 +263,7 @@ double yac_girards_area ( struct grid_cell cell ) {
int M = cell.num_corners;
if (M < 3) return area; // a degenerate cell
double * theta = malloc ( M * sizeof(theta[0]) );
double * theta = (double *)malloc ( M * sizeof(theta[0]) );
for ( m = 0; m < M; m++ ) {
theta[m] = yac_partial_area(cell.coordinates_x[(m+1)%M], cell.coordinates_y[(m+1)%M],
......@@ -393,7 +393,7 @@ lat_edge_correction(double base_point[3], double a[3], double b[3],
double lat_area = fabs((1.0 - h) * get_angle(lon_a, lon_b));
double pole[3] = {0, 0, (a[2] >= 0.0)?1:-1};
double pole[3] = {0, 0, (a[2] >= 0.0)?1.0:-1.0};
double gc_area = tri_area(a, b, pole);
double correction = MAX(lat_area - gc_area, 0.0);
......@@ -420,7 +420,7 @@ lat_edge_correction(double base_point[3], double a[3], double b[3],
if (fabs(scalar_base) < 1e-11) {
double norm_middle[3];
double pole[3] = {0,0,((a[2]>0)?1:-1)};
double pole[3] = {0,0,((a[2]>0)?1.0:-1.0)};
if (compute_norm_vector(middle_lat, pole, norm_middle)) return 0.0;
......@@ -450,7 +450,7 @@ double yac_pole_area ( struct grid_cell cell ) {
int closer_to_south_pole = cell.coordinates_y[0] < 0;
double pole_vec[3] = {0, 0, (closer_to_south_pole)?-1:1};
double pole_vec[3] = {0, 0, (closer_to_south_pole)?-1.0:1.0};
// it would also be possible to use the equator instead
// of the poles as the baseline
......
......@@ -155,6 +155,17 @@ void yac_compute_concave_overlap_areas (unsigned N,
"(x_coordinates == NULL || y_coordinates == NULL)",
__FILE__ , __LINE__);
#ifdef __cplusplus
double init_value[3] = {-1};
double init_2d_array_value[3*3] = {-1};
enum yac_edge_type edge_type_init_value[3]= {GREAT_CIRCLE};
struct grid_cell target_partial_cell;
target_partial_cell.coordinates_x = init_value;
target_partial_cell.coordinates_y = init_value;
target_partial_cell.coordinates_xyz = init_2d_array_value;
target_partial_cell.edge_type = edge_type_init_value;
target_partial_cell.num_corners = 3;
#else
struct grid_cell target_partial_cell =
{.coordinates_x = (double[3]){-1},
.coordinates_y = (double[3]){-1},
......@@ -162,6 +173,7 @@ void yac_compute_concave_overlap_areas (unsigned N,
.edge_type = (enum yac_edge_type[3]) {GREAT_CIRCLE},
.num_corners = 3};
#endif
static struct grid_cell * overlap_buffer = NULL;
static unsigned overlap_buffer_size = 0;
......@@ -864,22 +876,22 @@ static void copy_point_list(struct point_list in, struct point_list * out) {
if (curr == NULL) return;
struct point_list_element * new = get_free_point_list_element(out);
out->first = new;
*new = *curr;
struct point_list_element * new_point_list = get_free_point_list_element(out);
out->first = new_point_list;
*new_point_list = *curr;
curr = curr->next;
do {
new->next = get_free_point_list_element(out);
new = new->next;
*new = *curr;
new_point_list->next = get_free_point_list_element(out);
new_point_list = new_point_list->next;
*new_point_list = *curr;
curr = curr->next;
} while (curr != in.first);
new->next = out->first;
out->last = new;
new_point_list->next = out->first;
out->last = new_point_list;
}
void yac_cell_clipping (unsigned N,
......@@ -928,7 +940,7 @@ void yac_cell_clipping (unsigned N,
prev_tgt_point = prev_tgt_point->next;
} while (prev_tgt_point != target_list.first);
norm_vec = malloc(3 * nct * sizeof(*norm_vec));
norm_vec = (double *)malloc(3 * nct * sizeof(*norm_vec));
// compute norm vectors for all edges
// or for lat circle edges a special z value
......@@ -1271,13 +1283,13 @@ get_free_point_list_element(struct point_list * list) {
for (int i = 0; i < 7; ++i) {
element = malloc(1 * sizeof(*element));
element = (struct point_list_element *)malloc(1 * sizeof(*element));
element->next = list->free_elements;
list->free_elements = element;
}
element = malloc(1 * sizeof(*element));
element = (struct point_list_element *)malloc(1 * sizeof(*element));
} else {
......@@ -1381,10 +1393,10 @@ static void generate_overlap_cell(struct point_list * list,
free(cell->coordinates_y);
free(cell->coordinates_xyz);
free(cell->edge_type);
cell->coordinates_x = malloc(num_edges * sizeof(*cell->coordinates_x));
cell->coordinates_y = malloc(num_edges * sizeof(*cell->coordinates_y));
cell->coordinates_xyz = malloc(3 * num_edges * sizeof(*cell->coordinates_xyz));
cell->edge_type = malloc(num_edges * sizeof(*cell->edge_type));
cell->coordinates_x = (double *)malloc(num_edges * sizeof(*cell->coordinates_x));
cell->coordinates_y = (double *)malloc(num_edges * sizeof(*cell->coordinates_y));
cell->coordinates_xyz = (double *)malloc(3 * num_edges * sizeof(*cell->coordinates_xyz));
cell->edge_type = (enum yac_edge_type *)malloc(num_edges * sizeof(*cell->edge_type));
cell->array_size = num_edges;
}
cell->num_corners = num_edges;
......
......@@ -109,7 +109,7 @@ struct grid_vtable {
void (*pack_grid)(struct grid *, double **, unsigned, unsigned *, unsigned *,
unsigned **, unsigned, unsigned *, unsigned *);
struct grid_search * (*get_grid_search)(struct grid * grid);
void (*delete)(struct grid *);
void (*grid_delete)(struct grid *);
};
struct grid {
......
......@@ -60,13 +60,13 @@ void yac_copy_grid_cell(struct grid_cell in_cell, struct grid_cell * out_cell) {
free(out_cell->coordinates_y);
free(out_cell->coordinates_xyz);
free(out_cell->edge_type);
out_cell->coordinates_x = malloc(in_cell.num_corners *
out_cell->coordinates_x = (double *)malloc(in_cell.num_corners *
sizeof(*(out_cell->coordinates_x)));
out_cell->coordinates_y = malloc(in_cell.num_corners *
out_cell->coordinates_y = (double *)malloc(in_cell.num_corners *
sizeof(*(out_cell->coordinates_y)));
out_cell->coordinates_xyz = malloc(3 * in_cell.num_corners *
out_cell->coordinates_xyz = (double *)malloc(3 * in_cell.num_corners *
sizeof(*(out_cell->coordinates_xyz)));
out_cell->edge_type = malloc(in_cell.num_corners *
out_cell->edge_type = (enum yac_edge_type *)malloc(in_cell.num_corners *
sizeof(*(out_cell->edge_type)));
out_cell->array_size = in_cell.num_corners;
}
......
......@@ -1378,25 +1378,23 @@ static int loncxlatc_ (struct edge edge_a, struct edge edge_b) {
if (fabs(get_angle(edge_a.points[0].lon, edge_a.points[1].lon)) > tol) {
double lat = (edge_a.points[0].lat > 0)?M_PI_2:-M_PI_2;
struct edge edge_new_1;
edge_new_1.edge_type = LON_CIRCLE;
edge_new_1.points[0] = edge_a.points[0];
edge_new_1.points[1].lon = edge_a.points[0].lon;
edge_new_1.points[1].lat = lat;
struct edge edge_new_2;
edge_new_2.edge_type = LON_CIRCLE;
edge_new_2.points[0] = edge_a.points[1];
edge_new_2.points[1].lon = edge_a.points[1].lon;
edge_new_2.points[1].lat = lat;
return
loncxlatc_(
(struct edge){
.edge_type = LON_CIRCLE,
.points = {{.lon = edge_a.points[0].lon,
.lat = edge_a.points[0].lat},
{.lon = edge_a.points[0].lon,
.lat = lat}}}, edge_b)
loncxlatc_(edge_new_1, edge_b)
||
loncxlatc_(
(struct edge){
.edge_type = LON_CIRCLE,
.points = {{.lon = edge_a.points[1].lon,
.lat = edge_a.points[1].lat},
{.lon = edge_a.points[1].lon,
.lat = lat}}}, edge_b);
loncxlatc_(edge_new_2, edge_b);
}
// if edge b is at the pole
if (fabs(fabs(edge_b.points[0].lat) - M_PI_2) < tol) {
......
......@@ -39,7 +39,7 @@ static unsigned pointer_lookup_table_size = 0;
unsigned yac_pointer_to_unique_id(void * pointer) {
pointer_lookup_table = realloc (pointer_lookup_table,
pointer_lookup_table = (void **)realloc (pointer_lookup_table,
++pointer_lookup_table_size * sizeof(pointer_lookup_table[0]));
pointer_lookup_table[pointer_lookup_table_size-1] = pointer;
......
......@@ -29,7 +29,7 @@ void gridGenYvals(int gridtype, int ysize, double yfirst, double ylast, double y
int gridWeights(int gridID, double *weights);
int gridGenArea(int gridID, double *area);
void gaussaw(double *pa, double *pw, int nlat);
void gaussaw(double pa[], double pw[], size_t nlat);
int referenceToGrid(int gridID);
int gridToZonal(int gridID);
......
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