.TH "drstemplates.h" 3 "Tue May 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME drstemplates.h \- This C struct contains info on all the available GRIB2 Data Representation Templates used in Section 5 (DRS)\&. .SH SYNOPSIS .br .PP \fC#include 'grib2\&.h'\fP .br .SS "Data Structures" .in +1c .ti -1c .RI "struct \fBdrstemplate\fP" .br .RI "Stuct for GRIB2 Data Representation Section (DRS) template\&. " .in -1c .SS "Macros" .in +1c .ti -1c .RI "#define \fBMAXDRSMAPLEN\fP 200" .br .RI "maximum template map length " .ti -1c .RI "#define \fBMAXDRSTEMP\fP 9" .br .RI "maximum number of templates " .in -1c .SS "Variables" .in +1c .ti -1c .RI "const struct \fBdrstemplate\fP \fBtemplatesdrs\fP [\fBMAXDRSTEMP\fP]" .br .RI "Stuct holding data for GRIB2 Data Representation Section (DRS) template\&. " .in -1c .SH "Detailed Description" .PP This C struct contains info on all the available GRIB2 Data Representation Templates used in Section 5 (DRS)\&. The information decribing each template is stored in the drstemplate structure defined below\&. .PP Each Template has three parts: The number of entries in the template (mapdrslen); A map of the template (mapdrs), which contains the number of octets in which to pack each of the template values; and a logical value (needext) that indicates whether the Template needs to be extended\&. In some cases the number of entries in a template can vary depending upon values specified in the 'static' part of the template\&. (See Template 5\&.1 as an example\&.) .PP \fBNote\fP .RS 4 Array mapdrs contains the number of octets in which the corresponding template values will be stored\&. A negative value in mapdrs is used to indicate that the corresponding template entry can contain negative values\&. This information is used later when packing (or unpacking) the template data values\&. Negative data values in GRIB are stored with the left most bit set to one, and a negative number of octets value in mapdrs indicates that this possibility should be considered\&. The number of octets used to store the data value in this case would be the absolute value of the negative value in mapdrs\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbeert .RE .PP \fBDate\fP .RS 4 2002-10-26 .RE .PP .PP Definition in file \fBdrstemplates\&.h\fP\&. .SH "Data Type Documentation" .PP .SH "struct drstemplate" .PP Stuct for GRIB2 Data Representation Section (DRS) template\&. .PP Definition at line 39 of file drstemplates\&.h\&. .PP \fBData Fields:\fP .RS 4 \fBg2int\fP \fImapdrs[\fBMAXDRSMAPLEN\fP]\fP A map of the template\&. .br .PP \fBg2int\fP \fImapdrslen\fP Length of map of the template\&. .br .PP \fBg2int\fP \fIneedext\fP Whether the Template needs to be extended\&. .br .PP \fBg2int\fP \fItemplate_num\fP The number of entries in the template\&. .br .PP .RE .PP .SH "Macro Definition Documentation" .PP .SS "#define MAXDRSMAPLEN 200" .PP maximum template map length .PP Definition at line 34 of file drstemplates\&.h\&. .SS "#define MAXDRSTEMP 9" .PP maximum number of templates .PP Definition at line 33 of file drstemplates\&.h\&. .SH "Variable Documentation" .PP .SS "const struct \fBdrstemplate\fP templatesdrs[\fBMAXDRSTEMP\fP]" \fBInitial value:\fP .PP .nf = { { 0, 5, 0, {4,-2,-2,1,1} }, { 2, 16, 0, {4,-2,-2,1,1,1,1,4,4,4,1,1,4,1,4,1} }, { 3, 18, 0, {4,-2,-2,1,1,1,1,4,4,4,1,1,4,1,4,1,1,1} }, { 50, 5, 0, {4,-2,-2,1,4} }, { 51, 10, 0, {4,-2,-2,1,-4,2,2,2,4,1} }, { 40, 7, 0, {4,-2,-2,1,1,1,1} }, { 41, 5, 0, {4,-2,-2,1,1} }, { 40000, 7, 0, {4,-2,-2,1,1,1,1} }, { 40010, 5, 0, {4,-2,-2,1,1} } } .fi .PP Stuct holding data for GRIB2 Data Representation Section (DRS) template\&. .PP Definition at line 1 of file drstemplates\&.h\&. .PP Referenced by getdrsindex(), and getdrstemplate()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.