Merge remote-tracking branch 'origin/release-v4.6.1'
[WRF.git] / external / io_int / io_int_idx.h
blobb186dd96e3ad8ec2e16bc22bcf8e2fbfb8d27095
1 /*
3 * Public domain.
5 */
7 /**
8 * \file io_int_idx.h
9 * Definitions and data structures for WRF IO Internal.
10 **/
12 #ifndef WRF_IO_INT_IDX_H
13 #define WRF_IO_INT_IDX_H
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
19 #ifndef MAP_FILE /* 4.3+BSD defines & needs for */
20 # define MAP_FILE 0 /* mmap on files, all others don't */
21 #endif
23 /** Maximum length of a string.
24 * This has been equivalently defined in Fortran.
25 **/
26 #define STR_LEN 132
28 /** Record meta information. **/
29 struct r_info {
30 int64_t offset; /**< Offset to position in the file **/
31 int64_t data_off; /**< Offset to data **/
32 int32_t data_count; /**< Number of data elements **/
33 int32_t data_type; /**< WRF type of data elements **/
34 char name[STR_LEN]; /**< Name of the variable **/
35 char date[STR_LEN]; /**< Date of the variable **/
38 /** Create an inventory of a WRF IO Internal file **/
39 int32_t io_int_index(const char *, struct r_info **, int32_t *);
41 /** Lookup the data offset and count for a record **/
42 int32_t io_int_loc(const char *, struct r_info *, int32_t, int64_t *, int32_t *);
44 #ifdef __cplusplus
45 } /* extern "C" */
46 #endif
47 #endif /* WRF_IO_INT_IDX_H */