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