NCEPLIBS-g2c  1.8.0
g2cprod.c File Reference

Product functions for the g2c library. More...

#include "grib2_int.h"

Go to the source code of this file.

Functions

int g2c_get_prod (int g2cid, int msg_num, int prod_num, int *num_data_points, float *data)
 Read the data for a product. More...
 

Variables

G2C_FILE_INFO_T g2c_file [G2C_MAX_FILES+1]
 Global file information. More...
 

Detailed Description

Product functions for the g2c library.

Author
Ed Hartnett
Date
Oct 1, 2022

Definition in file g2cprod.c.

Function Documentation

◆ g2c_get_prod()

int g2c_get_prod ( int  g2cid,
int  msg_num,
int  prod_num,
int *  num_data_points,
float *  data 
)

Read the data for a product.

Parameters
g2cidFile ID.
msg_numMessage number in file (first message in file is message 0).
prod_numProduct number in message (first product in message is product 0).
num_data_pointsPointer that gets the number of data points in the product. Ignored if NULL.
dataPointer that gets the data. Ignored if NULL.
Returns
Author
Ed Hartnett
Date
Sep 28, 2022

Definition at line 28 of file g2cprod.c.

References g2c_message_info::bytes_to_msg, g2c_section_info::bytes_to_sec, g2c_section5_info::data_def, g2c_file_info::f, G2C_EBADID, G2C_EFILE, G2C_EINVAL, G2C_ENOMEM, G2C_ENOMSG, G2C_ENOPRODUCT, G2C_ENOSECTION, G2C_ERROR, g2c_file, G2C_MAX_FILES, G2C_NOERROR, g2c_unpack7(), g2c_section3_info::grid_def, g2c_section_info::msg, g2c_message_info::msg_num, g2c_message_info::next, g2c_section_info::next, g2c_section5_info::num_data_points, g2c_section_info::prev, g2c_message_info::sec, g2c_section_info::sec_info, g2c_section_info::sec_len, g2c_section_info::sec_num, g2c_section_info::template, and g2c_section_info::template_len.

Referenced by g2c_degrib2().

Variable Documentation

◆ g2c_file

G2C_FILE_INFO_T g2c_file[G2C_MAX_FILES+1]
extern

Global file information.

Definition at line 10 of file g2cfile.c.

Referenced by g2c_get_prod().