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