NCEPLIBS-g2c  1.6.4
g2_free.c
Go to the documentation of this file.
1 
7 #include <stdlib.h>
8 #include "grib2.h"
9 
23 void
25 {
26  if (gfld->idsect != 0 ) free(gfld->idsect);
27  if (gfld->local != 0 ) free(gfld->local);
28  if (gfld->list_opt != 0 ) free(gfld->list_opt);
29  if (gfld->igdtmpl != 0 ) free(gfld->igdtmpl);
30  if (gfld->ipdtmpl != 0 ) free(gfld->ipdtmpl);
31  if (gfld->coord_list != 0 ) free(gfld->coord_list);
32  if (gfld->idrtmpl != 0 ) free(gfld->idrtmpl);
33  if (gfld->bmap != 0 ) free(gfld->bmap);
34  if (gfld->fld != 0 ) free(gfld->fld);
35  free(gfld);
36 
37  return;
38 }
void g2_free(gribfield *gfld)
This routine frees up memory that was allocated for struct gribfield.
Definition: g2_free.c:24
Header file for NCEPLIBS-g2c library.
g2float * coord_list
Array containing floating point values intended to document the vertical discretisation associated to...
Definition: grib2.h:191
g2int * ipdtmpl
Contains the data values for the Product Definition Template specified by ipdtnum.
Definition: grib2.h:183
g2int * igdtmpl
Contains the data values for the Grid Definition Template specified by igdtnum.
Definition: grib2.h:171
g2int * idrtmpl
Contains the data values for the Data Representation Template specified by idrtnum.
Definition: grib2.h:205
g2int * list_opt
(Used if numoct_opt .ne.
Definition: grib2.h:159
g2int * idsect
Contains the entries in the Identification Section (Section 1).
Definition: grib2.h:115
g2float * fld
Array of ndpts unpacked data points.
Definition: grib2.h:233
unsigned char * local
Pointer to character array containing contents of Local Section 2, if included.
Definition: grib2.h:122
g2int * bmap
Integer array containing decoded bitmap, if ibmap=0 or ibap=254.
Definition: grib2.h:230
Struct for GRIB field.
Definition: grib2.h:61