Scroll to navigation

pdstemplates.c(3) NCEPLIBS-g2c pdstemplates.c(3)

NAME

pdstemplates.c - Functions for PDS template information.

SYNOPSIS

#include <stdlib.h>
#include 'grib2.h'
#include 'pdstemplates.h'

Functions


gtemplate * extpdstemplate (g2int number, g2int *list)
This subroutine generates the remaining octet map for a given Product Definition Template, if required. g2int getpdsindex (g2int number)
This function returns the index of specified Product Definition Template 4.NN (NN=number) in array templates. gtemplate * getpdstemplate (g2int number)
This subroutine returns PDS template information for a specified Product Definition Template 4.NN.

Detailed Description

Functions for PDS template information.

PROGRAM HISTORY LOG:

  • 2001-06-28 Gilbert
  • 2009-01-14 Vuong Changed structure name template to gtemplate
  • 2009-12-15 Vuong Added Product Definition Template 4.31 Added Product Definition Template 4.15
  • 2010-08-03 Vuong Added Product Definition Template 4.42 and 4.43
  • 2010-12-08 Vuong Corrected Product Definition Template 4.42 and 4.43
  • 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
  • 2013-08-05 Vuong Corrected 4.91 and added Templates 4.33,4.34,4.53,4.54
  • 2015-10-07 Vuong Added Templates 4.57, 4.60, 4.61 and allow a forecast time to be negative

Author

Stephen Gilbert

Date

2001-06-28

Definition in file pdstemplates.c.

Function Documentation

gtemplate* extpdstemplate (g2int number, g2int * list)

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.

Parameters

number NN, indicating the number of the Product Definition Template 4.NN that is being requested.
list The list of values for each entry in the the Product Definition Template 4.NN.

Returns

Pointer to the returned template struct. Returns NULL pointer, if template not found.

Author

Stephen Gilbert

Date

2000-05-11

Definition at line 108 of file pdstemplates.c.

References getpdsindex(), and getpdstemplate().

Referenced by g2_addfield(), and g2_unpack4().

g2int getpdsindex (g2int number)

This function returns the index of specified Product Definition Template 4.NN (NN=number) in array templates.

Parameters

number NN, indicating the number of the Product Definition Template 4.NN that is being requested.

Returns

Index of PDT 4.NN in array templates, if template exists. -1, otherwise.

Author

Stephen Gilbert

Date

2001-06-28

Definition at line 36 of file pdstemplates.c.

References MAXPDSTEMP, and templatespds.

Referenced by extpdstemplate(), and getpdstemplate().

gtemplate* getpdstemplate (g2int number)

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.

Parameters

number NN, indicating the number of the Product Definition Template 4.NN that is being requested.

Returns

Pointer to the returned template struct. Returns NULL pointer, if template not found.

Author

Stephen Gilbert

Date

2000-05-11

Definition at line 65 of file pdstemplates.c.

References getpdsindex(), and templatespds.

Referenced by extpdstemplate(), g2_addfield(), and g2_unpack4().

Author

Generated automatically by Doxygen for NCEPLIBS-g2c from the source code.

Tue May 3 2022 Version 1.6.4