.TH "pdstemplates.c" 3 "Fri Jun 3 2022" "Version 1.6.4" "NCEPLIBS-g2c" \" -*- nroff -*- .ad l .nh .SH NAME pdstemplates.c \- Functions for PDS template information\&. .SH SYNOPSIS .br .PP \fC#include \fP .br \fC#include 'grib2\&.h'\fP .br \fC#include 'pdstemplates\&.h'\fP .br .SS "Functions" .in +1c .ti -1c .RI "\fBgtemplate\fP * \fBextpdstemplate\fP (\fBg2int\fP number, \fBg2int\fP *list)" .br .RI "This subroutine generates the remaining octet map for a given Product Definition Template, if required\&. " .ti -1c .RI "\fBg2int\fP \fBgetpdsindex\fP (\fBg2int\fP number)" .br .RI "This function returns the index of specified Product Definition Template 4\&.NN (NN=number) in array templates\&. " .ti -1c .RI "\fBgtemplate\fP * \fBgetpdstemplate\fP (\fBg2int\fP number)" .br .RI "This subroutine returns PDS template information for a specified Product Definition Template 4\&.NN\&. " .in -1c .SH "Detailed Description" .PP Functions for PDS template information\&. PROGRAM HISTORY LOG: .IP "\(bu" 2 2001-06-28 Gilbert .IP "\(bu" 2 2009-01-14 Vuong Changed structure name template to gtemplate .IP "\(bu" 2 2009-12-15 Vuong Added Product Definition Template 4\&.31 Added Product Definition Template 4\&.15 .IP "\(bu" 2 2010-08-03 Vuong Added Product Definition Template 4\&.42 and 4\&.43 .IP "\(bu" 2 2010-12-08 Vuong Corrected Product Definition Template 4\&.42 and 4\&.43 .IP "\(bu" 2 2012-03-29 Vuong Added Templates 4\&.44,4\&.45,4\&.46,4\&.47,4\&.48,4\&.50, 4\&.51,4\&.91,4\&.32 and 4\&.52 .IP "\(bu" 2 2013-08-05 Vuong Corrected 4\&.91 and added Templates 4\&.33,4\&.34,4\&.53,4\&.54 .IP "\(bu" 2 2015-10-07 Vuong Added Templates 4\&.57, 4\&.60, 4\&.61 and allow a forecast time to be negative .PP .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2001-06-28 .RE .PP .PP Definition in file \fBpdstemplates\&.c\fP\&. .SH "Function Documentation" .PP .SS "\fBgtemplate\fP* extpdstemplate (\fBg2int\fP number, \fBg2int\fP * list)" .PP This subroutine generates the remaining octet map for a given Product Definition Template, if required\&. Some Templates can vary depending on data values given in an earlier part of the Template, and it is necessary to know some of the earlier entry values to generate the full octet map of the Template\&. .PP \fBParameters\fP .RS 4 \fInumber\fP NN, indicating the number of the Product Definition Template 4\&.NN that is being requested\&. .br \fIlist\fP The list of values for each entry in the the Product Definition Template 4\&.NN\&. .RE .PP \fBReturns\fP .RS 4 Pointer to the returned template struct\&. Returns NULL pointer, if template not found\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2000-05-11 .RE .PP .PP Definition at line 108 of file pdstemplates\&.c\&. .PP References getpdsindex(), and getpdstemplate()\&. .PP Referenced by g2_addfield(), and g2_unpack4()\&. .SS "\fBg2int\fP getpdsindex (\fBg2int\fP number)" .PP This function returns the index of specified Product Definition Template 4\&.NN (NN=number) in array templates\&. .PP \fBParameters\fP .RS 4 \fInumber\fP NN, indicating the number of the Product Definition Template 4\&.NN that is being requested\&. .RE .PP \fBReturns\fP .RS 4 Index of PDT 4\&.NN in array templates, if template exists\&. -1, otherwise\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2001-06-28 .RE .PP .PP Definition at line 36 of file pdstemplates\&.c\&. .PP References MAXPDSTEMP, and templatespds\&. .PP Referenced by extpdstemplate(), and getpdstemplate()\&. .SS "\fBgtemplate\fP* getpdstemplate (\fBg2int\fP number)" .PP This subroutine returns PDS template information for a specified Product Definition Template 4\&.NN\&. The number of entries in the template is returned along with a map of the number of octets occupied by each entry\&. Also, a flag is returned to indicate whether the template would need to be extended\&. .PP \fBParameters\fP .RS 4 \fInumber\fP NN, indicating the number of the Product Definition Template 4\&.NN that is being requested\&. .RE .PP \fBReturns\fP .RS 4 Pointer to the returned template struct\&. Returns NULL pointer, if template not found\&. .RE .PP \fBAuthor\fP .RS 4 Stephen Gilbert .RE .PP \fBDate\fP .RS 4 2000-05-11 .RE .PP .PP Definition at line 65 of file pdstemplates\&.c\&. .PP References getpdsindex(), and templatespds\&. .PP Referenced by extpdstemplate(), g2_addfield(), and g2_unpack4()\&. .SH "Author" .PP Generated automatically by Doxygen for NCEPLIBS-g2c from the source code\&.