From 8b96b3ad86448b96330fab62117d812bb4925333 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Wed, 25 Dec 2024 16:08:17 -0700 Subject: [PATCH] fixed threading problem in g2c_inq_dim() --- src/g2cinq.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/g2cinq.c b/src/g2cinq.c index 1df8fb06..413f90ad 100644 --- a/src/g2cinq.c +++ b/src/g2cinq.c @@ -439,3 +439,31 @@ g2c_inq_dim(int g2cid, int msg_num, int prod_num, int dim_num, size_t *len, return ret; } + +/** + * Learn about the one of the dimensions of a GRIB2 product. + * + * @param g2cid ID of the opened file, as from g2c_open(). + * @param msg_num Number of the message in the file, starting with the + * first message as 0. + * @param prod_num Product number. + * @param dim_num Dimension number, with the first dimension as 0. + * @param len Pointer that gets the length of this dimension. Ignored if NULL. + * @param name Pointer that gets the name of this dimension. Must have + * memory of size G2C_MAX_NAME. Ignored if NULL. + * + * @return + * - ::G2C_NOERROR No error. + * - ::G2C_EBADID File ID not found. + * - ::G2C_ENOMSG Message not found. + * - ::G2C_ENOPRODUCT Product not found. + * - ::G2C_ENOSECTION GDS not found. + * + * @author Ed Hartnett @date 10/21/22 + */ +int +g2c_inq_dim_info(int g2cid, int msg_num, int prod_num, int dim_num, size_t *len, + char *name) +{ + return g2c_inq_dim(g2cid, msg_num, prod_num, dim_num, len, name, NULL); +}