Skip to content

Commit

Permalink
documentation improvments (#546)
Browse files Browse the repository at this point in the history
* added some docs

* added some docs
  • Loading branch information
edwardhartnett authored Nov 1, 2024
1 parent 607596a commit 3661451
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/g2cfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,17 @@ g2c_add_file(const char *path, int mode, int *g2cid)
}

/** Open an existing GRIB2 file.
*
* This function opens the GRIB2 file and reads its metadata.
*
* GRIB2 messages in the file are assigned a message ID, starting with
* 0 for the first message in the file.
*
* Each product within a message is assigned a product ID, starting
* with 0 for the first product in the message.
*
* Files opened with this function should be closed with a call
* g2c_close() to release resources.
*
* @param path Path of the file.
* @param mode Open mode flags.
Expand Down
12 changes: 12 additions & 0 deletions src/g2cindex.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,18 @@ read_hdr_rec2(FILE *f, int *skipp, int *total_lenp, int *num_recp,
/**
* Open a GRIB1 index file and read the contents.
*
* This function opens the GRIB2 index file and reads its metadata,
* and opens the accompanying GRIB2 file.
*
* GRIB2 messages in the file are assigned a message ID, starting with
* 0 for the first message in the file.
*
* Each product within a message is assigned a product ID, starting
* with 0 for the first product in the message.
*
* Files opened with this function should be closed with a call
* g2c_close() to release resources.
*
* @param index_file The name that will be given to the index file. An
* existing file will be overwritten.
*
Expand Down

0 comments on commit 3661451

Please sign in to comment.