NCEPLIBS-g2c  1.7.0
g2_free.c
Go to the documentation of this file.
1 
7 #include <stdlib.h>
8 #include "grib2_int.h"
9 
23 void
25 {
26  if (gfld->idsect)
27  free(gfld->idsect);
28  if (gfld->local)
29  free(gfld->local);
30  if (gfld->list_opt)
31  free(gfld->list_opt);
32  if (gfld->igdtmpl)
33  free(gfld->igdtmpl);
34  if (gfld->ipdtmpl)
35  free(gfld->ipdtmpl);
36  if (gfld->coord_list)
37  free(gfld->coord_list);
38  if (gfld->idrtmpl)
39  free(gfld->idrtmpl);
40  if (gfld->bmap)
41  free(gfld->bmap);
42  if (gfld->fld)
43  free(gfld->fld);
44  free(gfld);
45 
46  return;
47 }
gribfield::igdtmpl
g2int * igdtmpl
Contains the data values for the Grid Definition Template specified by igdtnum.
Definition: grib2.h:152
gribfield::idsect
g2int * idsect
Contains the entries in the Identification Section (Section 1).
Definition: grib2.h:96
grib2_int.h
Header file with internal function prototypes NCEPLIBS-g2c library.
gribfield::idrtmpl
g2int * idrtmpl
Contains the data values for the Data Representation Template specified by idrtnum.
Definition: grib2.h:186
g2_free
void g2_free(gribfield *gfld)
This routine frees up memory that was allocated for struct gribfield.
Definition: g2_free.c:24
gribfield::coord_list
float * coord_list
Array containing floating point values intended to document the vertical discretisation associated to...
Definition: grib2.h:172
gribfield::fld
float * fld
Array of ndpts unpacked data points.
Definition: grib2.h:214
gribfield::local
unsigned char * local
Pointer to character array containing contents of Local Section 2, if included.
Definition: grib2.h:103
gribfield
Struct for GRIB field.
Definition: grib2.h:41
gribfield::list_opt
g2int * list_opt
(Used if numoct_opt .ne.
Definition: grib2.h:140
gribfield::bmap
g2int * bmap
Integer array containing decoded bitmap, if ibmap=0 or ibap=254.
Definition: grib2.h:211
gribfield::ipdtmpl
g2int * ipdtmpl
Contains the data values for the Product Definition Template specified by ipdtnum.
Definition: grib2.h:164