86 g2c_inq_msg(
int g2cid,
int msg_num,
unsigned char *discipline,
int *num_fields,
87 int *num_local,
short *center,
short *subcenter,
unsigned char *master_version,
88 unsigned char *local_version)
150 unsigned char *month,
unsigned char *day,
unsigned char *hour,
151 unsigned char *minute,
unsigned char *second)
207 g2c_inq_prod(
int g2cid,
int msg_num,
int prod_num,
int *pds_template_len,
208 int *pds_template,
int *gds_template_len,
int *gds_template,
209 int *drs_template_len,
int *drs_template)
240 for (sec4 = msg->
sec; sec4; sec4 = sec4->
next)
251 if (pds_template_len)
255 pds_template[t] = sec4->
template[t];
261 for (sec3 = sec4->
prev; sec3; sec3 = sec3->
prev)
271 if (gds_template_len)
275 gds_template[t] = sec3->
template[t];
281 for (sec5 = sec4->
next; sec5; sec5 = sec5->
next)
291 if (drs_template_len)
295 drs_template[t] = sec5->
template[t];
328 g2c_inq_dim(
int g2cid,
int msg_num,
int prod_num,
int dim_num,
size_t *len,
329 char *name,
float *val)
356 for (sec4 = msg->
sec; sec4; sec4 = sec4->
next)
364 for (sec3 = sec4->
prev; sec3; sec3 = sec3->
prev)
377 for (d = 0; d < dim->
len; d++)
378 val[d] = dim->
value[d];
int g2c_inq_prod(int g2cid, int msg_num, int prod_num, int *pds_template_len, int *pds_template, int *gds_template_len, int *gds_template, int *drs_template_len, int *drs_template)
Inquire about a product.
int g2c_inq(int g2cid, int *num_msg)
Learn about a GRIB2 file.
G2C_FILE_INFO_T g2c_file[G2C_MAX_FILES+1]
Global file information.
int g2c_inq_dim(int g2cid, int msg_num, int prod_num, int dim_num, size_t *len, char *name, float *val)
Learn about the one of the dimensions of a GRIB2 product.
int g2c_inq_msg_time(int g2cid, int msg_num, unsigned char *sig_ref_time, short *year, unsigned char *month, unsigned char *day, unsigned char *hour, unsigned char *minute, unsigned char *second)
Learn about the date/time information in a GRIB2 message.
int g2c_inq_msg(int g2cid, int msg_num, unsigned char *discipline, int *num_fields, int *num_local, short *center, short *subcenter, unsigned char *master_version, unsigned char *local_version)
Learn about a GRIB2 message.
EXTERN_MUTEX(m)
If pthreads are enabled, use externally-defined mutex for thread-safety.
#define G2C_MAX_FILES
Maximum number of open files.
#define G2C_ENOMSG
No GRIB message found.
#define G2C_ENOSECTION
Cannot find section.
#define G2C_MAX_NAME
Maximum length of a name.
#define G2C_ENOPRODUCT
Product not found.
#define G2C_EBADID
Bad ID.
#define G2C_NOERROR
No error.
Header file with internal function prototypes NCEPLIBS-g2c library.
struct g2c_section_info * next
Pointer to next in list.
struct g2c_section_info * sec
List of section metadata.
size_t len
Length of dimension.
short subcenter
Originating subcenter.
unsigned char master_version
GRIB master tables version number.
#define MUTEX_UNLOCK(m)
Pthreads not enabled, so do nothing.
unsigned char minute
Minute.
size_t num_messages
Number of messages in the file.
int num_local
Number of local sections in the message.
unsigned char sig_ref_time
Significance of reference time.
unsigned char discipline
Discipline from section 0.
char name[G2C_MAX_NAME+1]
Name of dimension.
struct g2c_section_info * prev
Pointer to previous in list.
int num_fields
Number of fields in the message.
unsigned char sec_num
Section number.
void * sec_info
Pointer to struct specific for section 3, 4, 5, 6, or 7.
float * value
Array of dimension values.
unsigned char second
Second.
int template_len
Number of entries in template.
unsigned char local_version
Version number of GRIB local tables used to augment Master Tables.
unsigned char month
Month.
size_t msg_num
Number of message in file (0-based).
#define MUTEX_LOCK(m)
Pthreads not enabled, so do nothing.
long long int * template
Grid, product, or data template.
struct g2c_message_info * next
Pointer to next in list.
short center
Originating center.
Keep information about dimensions defined in section 3.
This is the information about each open file.
This is the information about each message.
Information about Section 3 GRID DEFINITION SECTION.
Information about Section 4 PRODUCT DEFINITION SECTION.
Information about a section 3 through 7 in a GRIB2 message.