Commit 5b4f8135 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

zaxisDestroyKernel(): added cdiDeleteKeys() and cdiDeleteAtts().

parent bdc7b462
......@@ -197,10 +197,10 @@ void grid_free_components(grid_t *gridptr)
if ( p2free[i] ) Free(p2free[i]);
int gridID = gridptr->self;
// cdiDeleteKeys(gridID, CDI_XAXIS);
// cdiDeleteKeys(gridID, CDI_YAXIS);
// cdiDeleteKeys(gridID, CDI_GLOBAL);
// cdiDeleteAtts(gridID, CDI_GLOBAL);
cdiDeleteKeys(gridID, CDI_XAXIS);
cdiDeleteKeys(gridID, CDI_YAXIS);
cdiDeleteKeys(gridID, CDI_GLOBAL);
cdiDeleteAtts(gridID, CDI_GLOBAL);
}
void grid_free(grid_t *gridptr)
......
......@@ -63,15 +63,15 @@ struct gridVirtTable
struct gridaxis_t {
const char *stdname;
size_t size; // number of values
short flag; // 0: undefined 1:vals 2:first+inc
double first, last, inc;
double *vals;
double *bounds;
size_t size; // number of values
short flag; // 0: undefined 1:vals 2:first+inc
double first, last, inc;
double *vals;
double *bounds;
cdi_keys_t keys;
#ifndef USE_MPI
int clength;
char **cvals;
int clength;
char **cvals;
#endif
};
......@@ -82,37 +82,37 @@ struct grid_gme_t {
struct grid_t {
char *name;
int self;
size_t size;
int type; /* grid type */
int datatype; /* grid data type */
int proj; /* grid projection */
int projtype; /* grid projection type */
mask_t *mask;
mask_t *mask_gme;
double *area;
int self;
size_t size;
int type; /* grid type */
int datatype; /* grid data type */
int proj; /* grid projection */
int projtype; /* grid projection type */
mask_t *mask;
mask_t *mask_gme;
double *area;
struct grid_gme_t gme;
int number, position; /* parameter for GRID_REFERENCE */
int trunc; /* parameter for GRID_SPECTEAL */
int nvertex;
char *reference;
int *reducedPoints;
int reducedPointsSize;
int np; /* number of parallels between a pole and the equator */
signed char isCyclic; /* three possible states:
* -1 if unknown,
* 0 if found not cyclic, or
* 1 for global cyclic grids
*/
bool lcomplex;
bool hasdims;
int number, position; /* parameter for GRID_REFERENCE */
int trunc; /* parameter for GRID_SPECTRAL */
int nvertex;
char *reference;
int *reducedPoints;
int reducedPointsSize;
int np; /* number of parallels between a pole and the equator */
signed char isCyclic; /* three possible states:
* -1 if unknown,
* 0 if found not cyclic, or
* 1 for global cyclic grids
*/
bool lcomplex;
bool hasdims;
struct gridaxis_t x;
struct gridaxis_t y;
const struct gridVirtTable *vtable;
cdi_keys_t keys;
cdi_atts_t atts;
int scanningMode;
bool iScansNegatively, jScansPositively, jPointsAreConsecutive;
int scanningMode;
bool iScansNegatively, jScansPositively, jPointsAreConsecutive;
/* scanningMode = 128 * iScansNegatively + 64 * jScansPositively + 32 * jPointsAreConsecutive;
64 = 128 * 0 + 64 * 1 + 32 * 0
00 = 128 * 0 + 64 * 0 + 32 * 0
......
......@@ -278,9 +278,12 @@ void zaxisDestroyKernel( zaxis_t * zaxisptr )
if ( zaxisptr->weights ) Free( zaxisptr->weights );
if ( zaxisptr->vct ) Free( zaxisptr->vct );
Free( zaxisptr );
cdiDeleteKeys(id, CDI_GLOBAL);
cdiDeleteAtts(id, CDI_GLOBAL);
reshRemove ( id, &zaxisOps );
Free(zaxisptr);
reshRemove(id, &zaxisOps);
}
/*
......
Markdown is supported
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