This file is indexed.

/usr/include/cmor.h is in libcmor-dev 2.9.1-6.1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
#ifndef CMOR_H
#define CMOR_H

#define CMOR_VERSION_MAJOR 2
#define CMOR_VERSION_MINOR 9
#define CMOR_VERSION_PATCH 1

#define CMOR_CF_VERSION_MAJOR 1
#define CMOR_CF_VERSION_MINOR 4

#define CMOR_MAX_STRING 1024
#define CMOR_DEF_ATT_STR_LEN 256
#define CMOR_MAX_ELEMENTS 500
#define CMOR_MAX_AXES CMOR_MAX_ELEMENTS*3
#define CMOR_MAX_VARIABLES CMOR_MAX_ELEMENTS
#define CMOR_MAX_GRIDS 100
#define CMOR_MAX_DIMENSIONS 7
#define CMOR_MAX_ATTRIBUTES 100
#define CMOR_MAX_ERRORS 10
#define CMOR_MAX_TABLES 10
#define CMOR_MAX_GRID_ATTRIBUTES 25

#define CMOR_QUIET 0

#define CMOR_EXIT_ON_MAJOR 0
#define CMOR_EXIT 1
#define CMOR_EXIT_ON_WARNING 2

#define CMOR_WARNING 20
#define CMOR_NORMAL 21
#define CMOR_CRITICAL 22

#define CMOR_N_VALID_CALS 8

#define CMOR_PRESERVE_4 10
#define CMOR_APPEND_4 11
#define CMOR_REPLACE_4 12
#define CMOR_PRESERVE_3 13
#define CMOR_APPEND_3 14
#define CMOR_REPLACE_3 15
#define CMOR_PRESERVE CMOR_PRESERVE_3
#define CMOR_APPEND CMOR_APPEND_3
#define CMOR_REPLACE CMOR_REPLACE_3

extern int USE_NETCDF_4;
extern int CMOR_MODE;
extern int CMOR_TABLE;
extern int CMOR_VERBOSITY;
extern int CMOR_NETCDF_MODE;

extern int cleanup_varid;

extern int cmor_naxes;
extern int cmor_nvars;
extern int cmor_ntables;
extern int cmor_ngrids;

extern int cmor_nerrors;
extern int cmor_nwarnings;

extern char cmor_input_path[CMOR_MAX_STRING];

extern char cmor_traceback_info[CMOR_MAX_STRING];

typedef struct cmor_grid_ {
  int id;
  char mapping[CMOR_MAX_STRING];
  int nattributes;
  char attributes_names[CMOR_MAX_GRID_ATTRIBUTES][CMOR_MAX_STRING];
  double attributes_values[CMOR_MAX_GRID_ATTRIBUTES];
  int axes_ids[CMOR_MAX_DIMENSIONS];
  int original_axes_ids[CMOR_MAX_DIMENSIONS];
  int ndims;
  int istimevarying;
  int nvertices;
  double *lons;
  double *lats;
  double *blons;
  double *blats;
/*   double *area; */
/*   double *volumes; */
  int associated_variables[6]; /* for lon/lat/blon/blat/area/volumes */
} cmor_grid_t;

extern cmor_grid_t cmor_grids[CMOR_MAX_GRIDS];

typedef struct cmor_axis_def_ {
  int table_id;
  int climatology;
  char id[CMOR_MAX_STRING];
  char standard_name[CMOR_MAX_STRING];
  char units[CMOR_MAX_STRING];
  char axis;
  char positive;
  char long_name[CMOR_MAX_STRING];
  char out_name[CMOR_MAX_STRING];
  char type;
  char stored_direction;
  double valid_min;
  double valid_max;
  int n_requested;
  double *requested;
  char *crequested;
  char cname[CMOR_MAX_STRING];
  int n_requested_bounds;
  double *requested_bounds;
  double tolerance;
  double value;
  char cvalue[CMOR_MAX_STRING];
  double bounds_value[2];
  char required[CMOR_MAX_STRING];
  char formula[CMOR_MAX_STRING];
  char convert_to[CMOR_MAX_STRING];
  char z_factors[CMOR_MAX_STRING];
  char z_bounds_factors[CMOR_MAX_STRING];
  char index_only;
  int must_have_bounds;
  int must_call_cmor_grid;
} cmor_axis_def_t;

typedef struct cmor_axis_ {
  int ref_table_id;
  int ref_axis_id;
  int isgridaxis;
  char axis;
  char iunits[CMOR_MAX_STRING];
  char id[CMOR_MAX_STRING];
  int length;
  double *values;
  int *wrapping;
  double *bounds;
  char **cvalues;
  int revert;
  int offset;
  char type;
  char attributes_values_char[CMOR_MAX_ATTRIBUTES][CMOR_MAX_STRING];
  double attributes_values_num[CMOR_MAX_ATTRIBUTES];
  char attributes_type[CMOR_MAX_ATTRIBUTES]; /*stores attributes type */
  char attributes[CMOR_MAX_ATTRIBUTES][CMOR_MAX_STRING]; /*stores attributes names */
  int nattributes ; /* number of character type attributes */
  int hybrid_in;
  int hybrid_out;
  int store_in_netcdf;
} cmor_axis_t;
extern cmor_axis_t cmor_axes[CMOR_MAX_AXES];

typedef struct cmor_variable_def_ {
  int table_id;
  char id[CMOR_MAX_STRING];
  char standard_name[CMOR_MAX_STRING];
  char units[CMOR_MAX_STRING];
  char cell_methods[CMOR_MAX_STRING];
  char cell_measures[CMOR_MAX_STRING];
  char positive;
  char flag_values[CMOR_MAX_STRING];
  char flag_meanings[CMOR_MAX_STRING];
  char long_name[CMOR_MAX_STRING];
  char comment[CMOR_MAX_STRING];
  int ndims;
  int dimensions[CMOR_MAX_DIMENSIONS];
  char type;
  float valid_min;
  float valid_max;
  float ok_min_mean_abs;
  float ok_max_mean_abs;
  int shuffle;
  int deflate;
  int deflate_level;
  char required[CMOR_MAX_STRING];
  char realm[CMOR_MAX_STRING];
  char frequency[CMOR_MAX_STRING];
  char out_name[CMOR_MAX_STRING];
} cmor_var_def_t;

typedef struct cmor_var_ {
  int self;
  int grid_id;
  int sign;
  int zfactor;
  int ref_table_id;
  int ref_var_id;
  int initialized;
  int closed;
  int nc_var_id;
  int nc_zfactors[CMOR_MAX_VARIABLES];
  int nzfactor;
  int ntimes_written;
  double last_time_written;
  double last_time_bounds_written[2];
  int ntimes_written_coords[10];
  int associated_ids[10];
  int ntimes_written_associated[10];
  int time_nc_id;
  int time_bnds_nc_id;
  char id[CMOR_MAX_STRING];
  int ndims;
  int singleton_ids[CMOR_MAX_DIMENSIONS];
  int axes_ids[CMOR_MAX_DIMENSIONS];
  int original_order[CMOR_MAX_DIMENSIONS];
  char attributes_values_char[CMOR_MAX_ATTRIBUTES][CMOR_MAX_STRING];
  double attributes_values_num[CMOR_MAX_ATTRIBUTES];
  char attributes_type[CMOR_MAX_ATTRIBUTES]; /*stores attributes type */
  char attributes[CMOR_MAX_ATTRIBUTES][CMOR_MAX_STRING]; /*stores attributes names */
  int nattributes ; /* number of  attributes */
  char type;
  char itype;
  double missing;
  double omissing;
  double tolerance;
  float valid_min;
  float valid_max;
  float ok_min_mean_abs;
  float ok_max_mean_abs;
  int shuffle;
  int deflate;
  int deflate_level;
  int nomissing;
  char iunits[CMOR_MAX_STRING];
  char ounits[CMOR_MAX_STRING];
  int isbounds;
  int needsinit; /* need to be init or associated to file */
  int zaxis; /* for z vars, associated axis stored here */
  double *values;
  double first_time;
  double last_time;
  double first_bound;
  double last_bound;
  char base_path[CMOR_MAX_STRING];
  char current_path[CMOR_MAX_STRING];
  char suffix[CMOR_MAX_STRING];
  int suffix_has_date;
} cmor_var_t;

extern cmor_var_t cmor_vars[CMOR_MAX_VARIABLES];

typedef struct cmor_mappings_ {
  int nattributes;
  char id[CMOR_MAX_STRING];
  char attributes_names[CMOR_MAX_GRID_ATTRIBUTES][CMOR_MAX_STRING];
  char coordinates[CMOR_MAX_STRING];
} cmor_mappings_t;

typedef struct cmor_table_ {
  int id;
  int nvars;
  int naxes;
  int nexps;
  int nmappings;
  float cf_version;
  float cmor_version;
  char project_id[CMOR_MAX_STRING];
  char table_id[CMOR_MAX_STRING];
  char expt_ids[CMOR_MAX_ELEMENTS][CMOR_MAX_STRING];
  char sht_expt_ids[CMOR_MAX_ELEMENTS][CMOR_MAX_STRING];
  char date[CMOR_MAX_STRING];
  cmor_axis_def_t axes[CMOR_MAX_ELEMENTS];
  cmor_var_def_t vars[CMOR_MAX_ELEMENTS];
  cmor_mappings_t mappings[CMOR_MAX_ELEMENTS];
  float missing_value;
  double interval;
  float interval_warning;
  float interval_error;
  char URL[CMOR_MAX_STRING];
  char product[CMOR_MAX_STRING];
  char realm[CMOR_MAX_STRING];
  char path[CMOR_MAX_STRING];
  char required_gbl_att[CMOR_MAX_STRING];
  char frequency[CMOR_MAX_STRING];
  char **forcings;
  int nforcings;
  unsigned char md5[16];
  char generic_levels[CMOR_MAX_ELEMENTS][CMOR_MAX_STRING];
} cmor_table_t;

extern cmor_table_t cmor_tables[CMOR_MAX_TABLES];

typedef struct cmor_dataset_def_ {
  char outpath[CMOR_MAX_STRING];
  char conventions[CMOR_MAX_STRING];
  char attributes_names[CMOR_MAX_ATTRIBUTES][CMOR_MAX_STRING];
  char attributes_values[CMOR_MAX_ATTRIBUTES][CMOR_MAX_STRING];
  int nattributes;
  int realization;
  int leap_year;
  int leap_month;
  int month_lengths[12];
  int initiated;
  int associate_file; /*flag to store associated variables separately */
  int associated_file; /* ncid of associated file */
  char associated_file_name[CMOR_MAX_STRING]; /*associated file path */
  char tracking_id[CMOR_MAX_STRING]; /*associated tracking id */
} cmor_dataset_def;

extern cmor_dataset_def cmor_current_dataset;

/* Now the funcs declarations */
#include "cmor_func_def.h"
#endif