18 #define G2_VERSION "g2clib-1.6.4"
g2int igdtnum
Grid Definition Template Number (See Table 3.1).
void mkieee(g2float *, g2int *, g2int)
This subroutine stores a list of real values in 32-bit IEEE floating point format.
g2int locallen
Length of array local.
g2int ibmap
Bitmap indicator (see Table 6.0).
g2int g2_unpack7(unsigned char *, g2int *, g2int, g2int *, g2int, g2int *, g2int, g2float **)
This subroutine unpacks Section 7 (Data Section) as defined in GRIB Edition 2.
gtemplate * getpdstemplate(g2int)
This subroutine returns PDS template information for a specified Product Definition Template.
g2int interp_opt
Interpretation of list for optional points definition.
g2int ngrdpts
Number of grid points in the defined grid.
g2int g2_addgrid(unsigned char *, g2int *, g2int *, g2int *, g2int)
This routine packs up a Grid Definition Section (Section 3) and adds it to a GRIB2 message.
g2int g2_unpack6(unsigned char *, g2int *, g2int, g2int *, g2int **)
This subroutine unpacks Section 6 (Bit-Map Section) as defined in GRIB Edition 2.
g2int ifldnum
Field number within GRIB message.
g2float * coord_list
Array containing floating point values intended to document the vertical discretisation associated to...
g2int * ext
Number of octets of each entry in the extension part of the template.
double int_power(double, g2int)
Function similar to C pow() power function.
g2int g2_unpack1(unsigned char *, g2int *, g2int **, g2int *)
This subroutine unpacks Section 1 - Identification Section as defined in GRIB Edition 2.
g2int g2_unpack5(unsigned char *, g2int *, g2int *, g2int *, g2int **, g2int *)
This subroutine unpacks Section 5 (Data Representation Section) as defined in GRIB Edition 2.
gtemplate * extdrstemplate(g2int, g2int *)
This subroutine generates the remaining octet map for a given Data Representation Template,...
g2int griddef
Source of grid definition (see Table 3.0).
void gbits(unsigned char *, g2int *, g2int, g2int, g2int, g2int)
Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each...
g2int ipdtnum
Product Definition Template Number (see Table 4.0).
g2int * ipdtmpl
Contains the data values for the Product Definition Template specified by ipdtnum.
g2int discipline
Message Discipline (see Table 0.0).
g2int g2_getfld(unsigned char *, g2int, g2int, g2int, gribfield **)
This subroutine returns all the metadata, template values, bit-map (if applicable),...
g2int numoct_opt
Number of octets needed for each additional grid points definition.
void sbit(unsigned char *, g2int *, g2int, g2int)
Store bits - put arbitrary size values into a packed bit string, taking the low order bits from each ...
g2int g2_gribend(unsigned char *)
This routine finalizes a GRIB2 message after all grids and fields have been added.
void misspack(g2float *, g2int, g2int, g2int *, unsigned char *, g2int *)
This subroutine packs up a data field using a complex packing algorithm as defined in the GRIB2 docum...
g2int idrtlen
Number of elements in idrtmpl.
g2int extlen
Number of entries in the template extension.
g2int unpacked
Logical value indicating whether the bitmap and data values were unpacked.
g2int g2_unpack3(unsigned char *, g2int *, g2int **, g2int **, g2int *, g2int **, g2int *)
This routine unpacks Section 3 (Grid Definition Section) as defined in GRIB Edition 2.
gtemplate * getdrstemplate(g2int)
This subroutine returns DRS template information for a specified Data Representation Template.
int pack_gp(g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *, g2int *)
Determines groups of variable size, but at least of size minpk, the associated max (jmax( )) and min ...
g2int * map
Number of octets of each entry in the static part of the template.
g2int idsectlen
Number of elements in idsect.
g2int g2_info(unsigned char *, g2int *, g2int *, g2int *, g2int *)
This subroutine searches through a GRIB2 message and returns the number of gridded fields found in th...
g2int ipdtlen
Number of elements in ipdtmpl - i.e.
g2int needext
Indicates whether or not the template needs to be extended.
g2int g2_unpack4(unsigned char *, g2int *, g2int *, g2int **, g2int *, g2float **, g2int *)
This subroutine unpacks Section 4 (Product Definition Section) as defined in GRIB Edition 2.
gtemplate * getgridtemplate(g2int)
This subroutine returns grid template information for a specified Grid Definition Template for [Secti...
uint64_t g2intu
Unsigned long integer type.
g2int num
The template number.
g2int * igdtmpl
Contains the data values for the Grid Definition Template specified by igdtnum.
g2int idrtnum
Data Representation Template Number (see Table 5.0).
g2int ndpts
Number of data points unpacked and returned.
g2int g2_create(unsigned char *, g2int *, g2int *)
This routine initializes a new GRIB2 message and packs GRIB2 sections 0 (Indicator Section) and 1 (Id...
g2int * idrtmpl
Contains the data values for the Data Representation Template specified by idrtnum.
g2int g2_addlocal(unsigned char *, unsigned char *, g2int)
This routine adds a Local Use Section (Section 2) to a GRIB2 message.
g2int * list_opt
(Used if numoct_opt .ne.
gtemplate * extpdstemplate(g2int, g2int *)
This subroutine generates the remaining octet map for a given Product Definition Template,...
g2int version
GRIB edition number (2).
void gbit(unsigned char *, g2int *, g2int, g2int)
Get bits - unpack bits: Extract arbitrary size values from a packed bit string, right justifying each...
g2int g2_addfield(unsigned char *, g2int, g2int *, g2float *, g2int, g2int, g2int *, g2float *, g2int, g2int, g2int *)
This routine packs up Sections 4 through 7 for a given field and adds them to a GRIB2 message.
g2int type
The template type: 3 Grid Defintion Template.
void simpack(g2float *, g2int, g2int *, unsigned char *, g2int *)
This subroutine packs up a data field using the simple packing algorithm as defined in the GRIB2 docu...
g2int * idsect
Contains the entries in the Identification Section (Section 1).
void g2_free(gribfield *)
This routine frees up memory that was allocated for struct gribfield.
g2float * fld
Array of ndpts unpacked data points.
g2int num_coord
Number of values in array coord_list.
void seekgb(FILE *, g2int, g2int, g2int *, g2int *)
This subprogram searches a file for the next GRIB Message.
unsigned char * local
Pointer to character array containing contents of Local Section 2, if included.
g2int expanded
Logical value indicating whether the data field was expanded to the grid in the case where a bit-map ...
g2int num_opt
(Used if numoct_opt .ne.
g2int igdtlen
Number of elements in igdtmpl - i.e.
gtemplate * extgridtemplate(g2int, g2int *)
This subroutine generates the remaining octet map for a given Grid Definition Template,...
g2int maplen
Number of entries in the static part of the template.
g2int * bmap
Integer array containing decoded bitmap, if ibmap=0 or ibap=254.
int64_t g2int
Long integer type.
void sbits(unsigned char *, g2int *, g2int, g2int, g2int, g2int)
Store bits - put arbitrary size values into a packed bit string, taking the low order bits from each ...
void compack(g2float *, g2int, g2int, g2int *, unsigned char *, g2int *)
This subroutine packs up a data field using a complex packing algorithm as defined in the GRIB2 docum...
void rdieee(g2int *, g2float *, g2int)
This subroutine reads a list of real values in 32-bit IEEE floating point format.
Struct for GRIB template.