Skip to content

Commit

Permalink
fixed threading problem in g2c_inq_dim()
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Dec 25, 2024
1 parent 1ac7ef8 commit 8b96b3a
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/g2cinq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 8b96b3a

Please sign in to comment.