OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
ANCroutines.c
Go to the documentation of this file.
1 #include "ancil.h"
2 #include "l1io.h"
3 
4 /*********************************************************************
5  * NAME: startHDF
6  *
7  * PURPOSE: open HDF file structure using SDstart and Hopen routines
8  *
9  * ARGS:
10  * outfile - output filename
11  * sdfid - SD file id
12  * fid - HDF file id
13  * mode - DFACC_RDONLY, DFACC_CREATE, DFACC_RDWR
14  *
15  * OUTPUTS: returns a SD structure ID and a File ID.
16  *
17  * EFFECTS: opens HDF file structures
18  *
19  * RETURNS: status flag
20  * Mods: BDS 2/10/94 ver 3.3, (pg: SD32) does not use DFAAC_WRITE so
21  * its removed here as an option arg.
22  * 8/21/96 BDS - renamed 'perror' to 'pexit' to avoid HDF4.0 conflict.
23  *********************************************************************/
24 
25 int startHDF(outfile, sdfid, fid, mode)
26 char *outfile;
27 int32_t *sdfid, *fid, mode;
28 {
29  int32_t lsdfid, lfid;
30 
31  if ((lsdfid = SDstart(outfile, mode)) < 0) return FAIL;
32  if ((lfid = Hopen(outfile, DFACC_RDONLY, 0)) < 0) return FAIL;
33  Vstart(lfid);
34 
35  *sdfid = lsdfid;
36  *fid = lfid;
37 
38  return SUCCESS;
39 
40 } /* startHDF */
41 
42 /*********************************************************************
43  * setupGrid
44  *
45  * create and HDF Vgroup grid and name it with passed arguments
46  *
47  *********************************************************************/
48 
49 int32_t setupGrid(fid, grpname)
50 int32_t fid;
51 char *grpname;
52 {
53  int32_t gridid;
54 
55  gridid = Vattach(fid, -1, "w");
56  /* Vsetclass(gridid, vgroupclass); */
57  Vsetname(gridid, grpname);
58 
59  return gridid;
60 }
61 
62 /*********************************************************************
63  * gridToGrid
64  *
65  * attach inner grid to outer grid: nested Vgroups
66  *
67  *********************************************************************/
68 
69 int32_t gridToGrid(outergridid, innergridid)
70 int32_t outergridid, innergridid;
71 {
72  int32_t groupref;
73 
74  groupref = VQueryref(innergridid);
75  if (groupref < 0) return -1;
76 
77  Vaddtagref(outergridid, DFTAG_VG, groupref);
78 
79  return 0;
80 }
81 
82 /*********************************************************************
83  * writeGeom
84  *
85  * write HDF geometry Vdata using SeaWiFS defined geometry structure
86  *
87  * return geometry ID
88  *
89  *********************************************************************/
90 
91 int32_t writeGeom(int32_t fid, int32_t gridid, char *geomname, int32_t bin_meth, int32_t registration,
92  float vsize, float hsize, float max_north, float max_south, float max_west, float max_east)
93 {
94  int32_t geomid, geomref, *i32;
95  int result;
96  float *f32;
97  unsigned char arrhold[GEOMSIZE];
98 
99  /*
100  * --- Write geometry struct for data array and QC data array ----
101  */
102 
103  geomid = VSattach(fid, -1, "w");
104  result = VSfdefine(geomid, "bin_meth", DFNT_INT32, 1);
105  result = VSfdefine(geomid, "registration", DFNT_INT32, 1);
106  result = VSfdefine(geomid, "vsize", DFNT_FLOAT32, 1);
107  result = VSfdefine(geomid, "hsize", DFNT_FLOAT32, 1);
108  result = VSfdefine(geomid, "max_north", DFNT_FLOAT32, 1);
109  result = VSfdefine(geomid, "max_south", DFNT_FLOAT32, 1);
110  result = VSfdefine(geomid, "max_west", DFNT_FLOAT32, 1);
111  result = VSfdefine(geomid, "max_east", DFNT_FLOAT32, 1);
112 
113  VSsetclass(geomid, GEOMCLASS);
114  VSsetname(geomid, geomname);
115 
116  result = VSsetfields(geomid,
117  "bin_meth,registration,vsize,hsize,max_north,max_south,max_west,max_east");
118 
119  i32 = (void *) &arrhold[0];
120  *i32 = bin_meth;
121  i32 = (void *) &arrhold[4];
122  *i32 = registration;
123 
124  f32 = (void *) &arrhold[8];
125  *f32 = vsize;
126  f32 = (void *) &arrhold[12];
127  *f32 = hsize;
128  f32 = (void *) &arrhold[16];
129  *f32 = max_north;
130  f32 = (void *) &arrhold[20];
131  *f32 = max_south;
132  f32 = (void *) &arrhold[24];
133  *f32 = max_west;
134  f32 = (void *) &arrhold[28];
135  *f32 = max_east;
136 
137  result = VSwrite(geomid, arrhold, 1, FULL_INTERLACE);
138  VSdetach(geomid);
139 
140  /*
141  * get geometry reference and add to vgroup
142  */
143 
144  geomref = VSQueryref(geomid);
145  Vaddtagref(gridid, DFTAG_VH, geomref);
146 
147  if (result < 0)
148  return ERROR;
149  else
150  return geomid;
151 
152 } /* writeGeom */
153 
154 /*********************************************************************
155  * findGeomId
156  *
157  * find existing HDF geometry ID
158  *
159  *********************************************************************/
160 
161 int32 findGeomId(fid, geomname)
162 int32 fid;
163 char *geomname;
164 {
165  int32 geomid, vsid;
166 
167  if ((vsid = VSfind(fid, geomname)) < 0)
168  pexit("getting geom vsid");
169 
170  if ((geomid = VSattach(fid, vsid, "r")) < 0)
171  pexit("attaching geom vsid");
172 
173  return geomid;
174 
175 } /* findGeomId */
176 
177 /*********************************************************************
178  * linkGeom
179  *
180  * link to existing HDF geometry Vdata
181  * get geometry reference and add to vgroup
182  *
183  *********************************************************************/
184 
185 int32 linkGeom(gridid, geomid)
186 int32 gridid, geomid;
187 {
188  int32 geomref, result;
189 
190  geomref = VSQueryref(geomid);
191  result = Vaddtagref(gridid, DFTAG_VH, geomref);
192 
193  return result;
194 
195 } /* linkGeom */
196 
197 /*********************************************************************
198  * detachGeom
199  *
200  * detach Geometry ID
201  *
202  *********************************************************************/
203 
204 int32 detachGeom(geomid)
205 int32 geomid;
206 {
207 
208  VSdetach(geomid);
209 
210  return 0;
211 
212 } /* detachGeom */
213 
214 /*********************************************************************
215  * addAttr
216  *
217  * add an attribute to an existing SDS
218  *
219  *********************************************************************/
220 
221 int addAttr(sdsid, dataattr, datatype, dataunit)
222 int32 sdsid;
223 char *dataattr;
224 int32 datatype;
225 char *dataunit;
226 {
227  int result;
228 
229  if ((result = SDsetattr(sdsid, dataattr, datatype, strlen(dataunit) + 1,
230  dataunit)) != 0) return (-1);
231 
232  return result;
233 
234 } /* addAttr */
235 
236 /*********************************************************************
237  * setSDSref
238  *
239  * get and SDS reference number and add it to an existing Vgroup
240  * end SDS access
241  *
242  *********************************************************************/
243 
244 int setSDSref(sdsid, gridid)
245 int32 sdsid, gridid;
246 {
247  int32 sdsref;
248  int result;
249 
250  if ((sdsref = (int32) SDidtoref(sdsid)) < 0) return (-1);
251 
252  Vaddtagref(gridid, DFTAG_NDG, sdsref);
253  if ((result = SDendaccess(sdsid)) < 0) return result;
254 
255  return 0;
256 
257 } /* setSDSref */
258 
259 /*********************************************************************
260  * deattachHDFgrid
261  *
262  * make HDF grid structure inactive
263  *
264  *********************************************************************/
265 
266 int deattachHDFgrid(gridid)
267 int32 gridid;
268 {
269  return Vdetach(gridid);
270 
271 } /* deattachHDFgrid */
272 
273 /*********************************************************************
274  * closeHDFstructs
275  *
276  * close HDF file structures
277  *
278  *********************************************************************/
279 
280 int closeHDFstructs(sdfid, fid)
281 int32 sdfid, fid;
282 {
283  int result;
284 
285  if ((result = Vend(fid)) < 0) {
286  printf("Vend: result: %d\n", result);
287  return (-1);
288  }
289 
290  if ((result = SDend(sdfid)) < 0) {
291  printf("SDend: result: %d\n", result);
292  return (-1);
293  }
294 
295  if ((result = Hclose(fid)) < 0) {
296  printf("Error on Hclose(); stack follows:\n");
297  HEprint(stderr, 0);
298  printf("Stack complete\n");
299  return (-1);
300  }
301 
302  return result;
303 
304 } /* closeHDFstructs */
305 
306 /*****************************************************************
307  * File: wrtsds
308  *
309  * Purpose: write an SDS file
310  *
311  * Description: writes an SDS given labels, formats, units, and a
312  * data block.
313  *
314  * Input parms:
315  * char *sdsfid - file id
316  * int rank - number of dimensions in SDS
317  * int32 shape[] - dimension sizes for each dimension
318  * int32 datatype - HDF datatype of data block
319  * char *datalabel - label descriptor for SDS
320  * char *dataunit - unit descriptor for SDS
321  * char *datafmt - format descriptor for SDS
322  * void *data - array of data values
323  *
324  * Output parms: none
325  *
326  * Returns: 0 on success, non-zero on failure
327  *
328  * Local vars:
329  * int result - HDF routine return value
330  *
331  * Subs called: HDF library routines SDcreate, SDwritedata
332  *
333  * History: none
334  *
335  * Note: uses "ancil.h"
336  *
337  * Author: Brian D. Schieber, GSC, 2/93
338  *
339  * Modification history:
340  * BDS, 9/3/93 - modified for new HDF interface
341  *
342  *****************************************************************/
343 
344 int32 wrtsds(sdfid, rank, shape, datatype, datalabel, data)
345 
346 int32 sdfid, shape[], datatype;
347 int rank;
348 char *datalabel;
349 void *data;
350 {
351  int result = 0;
352  int32 sdsid;
353  static int32 start[2] = {0, 0};
354 
355  if ((sdsid = SDcreate(sdfid, datalabel, datatype, rank, shape)) < 0)
356  return sdsid;
357 
358  if ((result = SDwritedata(sdsid, start, NULL, shape, data)) < 0)
359  return result;
360 
361  return sdsid;
362 
363 } /* wrtsds */
364 
365 /*****************************************************************
366  * File: rewrtsds
367  *
368  * Purpose: overwrite an SDS file
369  *
370  * Description: overwrite an SDS given prior sdsid, data shape, and
371  * data block.
372  *
373  * Input parms:
374  * char *sdsid - sds id
375  * int32 shape[] - dimension sizes for each dimension
376  * void *data - array of data values
377  *
378  * Output parms: none
379  *
380  * Returns: 0 on success, non-zero on failure
381  *
382  * Local vars:
383  * int result - HDF routine return value
384  *
385  * Subs called: HDF library routines SDwritedata
386  *
387  * History: none
388  *
389  * Note: uses "ancil.h"
390  *
391  * Author: Brian D. Schieber, GSC, 2/93
392  *
393  * Modification history:
394  * BDS, 9/3/93 - modified for new HDF interface
395  *
396  *****************************************************************/
397 
398 int32 rewrtsds(sdsid, shape, data)
399 int32 sdsid, shape[];
400 void *data;
401 {
402  int result = 0;
403  static int32 start[2] = {0, 0};
404 
405  printf("rewrtsds sdsid %d, shape[0] %d, shape[1] %d\n",
406  sdsid, shape[0], shape[1]);
407 
408  result = SDwritedata(sdsid, start, NULL, shape, data);
409  printf("rewrtsds SDwritedata result: %d\n", result);
410 
411  result += SDendaccess(sdsid);
412  printf("rewrtsds SDendaccess result: %d\n", result);
413 
414  return result;
415 
416 } /* rewrtsds */
417 
418 /*****************************************************************
419  * File: rdsds
420  *
421  * Purpose: read HDF Scientific Data Set (SDS)
422  *
423  * Description: read HDF Scientific Data Set (SDS) and return
424  * descriptors and data values. Reads one SDS at a time.
425  *
426  * Input parameters:
427  * char *filename - HDF base name (no ext)
428  * char *vgname - name of vgroup where SDS exists
429  * char *sdsname - name of SDS data grid
430  *
431  * Output parameters:
432  * int32 dimsizes[] - size of each dimension
433  * void *inData - array of data
434  *
435  * Returns: -1 on failure, 0 on success
436  *
437  * Local variables:
438  * int result - counters, return value
439  *
440  * Subroutines called: HDF library routines
441  *
442  * History: none
443  *
444  * Note: arrays returned from this routine must 'fit' the variables
445  * allocated space in the calling routine. Any dimension, any size
446  * SDS can be returned. The 'dimsizes' returned should be verified
447  * to determine the SDS size retreived.
448  *
449  * Author: Brian D. Schieber, GSC, 4/93
450  *
451  * Modification history:
452  * modified for the new HDF formats 10/8/93, BDS, GSC/SAIC
453  * BDS, 8/14/95 Mods per OAPS spec 2.7
454  *****************************************************************/
455 
456 int rdsds(filename, vgname, sdsname, dimsizes, inData)
457 char *filename, *sdsname;
458 char *vgname;
459 int32 dimsizes[];
460 void *inData;
461 {
462  int result;
463  int j;
464  int32 sdfid, fid, vid, vg;
465  int32 sdsindex, sdsid;
466  int32 rank, numbertype;
467  int32 start[2];
468  int32 tagarray1[255], refarray1[255], nrefs1, nattrs1;
469  char lname[MAXNAMELNG];
470 
471  /*
472  * Default settings for SDreaddata
473  */
474 
475  start[0] = 0;
476  start[1] = 0;
477 
478  /*
479  * ---- Open data file ------------
480  */
481 
482  if ((result = startHDF(filename, &sdfid, &fid, DFACC_RDONLY)) != 0) {
483  pwarning("Fatal error starting HDF file");
484  return (ERROR);
485  }
486 
487  /*
488  * Traverse down to the correct SDS
489  */
490 
491  /* Open the Vgroup by name and fileid, attach to it and get the number
492  * and tag type (SDG, VH, etc) in it, loop over each item and find
493  * the ones that match the desired SDS and then use the SDS reference
494  * and extract the SDS array to the calling procedure.
495  */
496 
497  if ((vid = Vfind(fid, vgname)) <= 0) return (ERROR);
498  vg = Vattach(fid, vid, "r");
499  nrefs1 = Vntagrefs(vg);
500  nattrs1 = nrefs1;
501  Vgettagrefs(vg, tagarray1, refarray1, nattrs1);
502 
503  for (j = 0; j < nrefs1; j++) {
504  if ((tagarray1[j] == DFTAG_NDG) ||
505  (tagarray1[j] == DFTAG_SD)) { /* SDS found */
506  sdsindex = SDreftoindex(sdfid, refarray1[j]);
507  sdsid = SDselect(sdfid, sdsindex);
508  SDgetinfo(sdsid, lname, &rank, dimsizes, &numbertype, &nattrs1);
509  if (!strcmp(sdsname, lname)) {
510  if ((SDreaddata(sdsid, start, (int32 *) NULL, dimsizes, inData)) != 0) {
511  pwarning("Fatal error reading SDS data array");
512  return (ERROR);
513  }
514  Vdetach(vg);
515  return (0); /* SUCCESS */
516  } /* if (!strcmp(vgname, lname)) */
517  } /* tagarray1[k] */
518  } /* for j */
519  Vdetach(vg);
520  pwarning("Fatal error: Case 1 SDS data array not found");
521  return (ERROR);
522 
523  /*
524  * ---- Close data file ------------
525  */
526 
527  if ((closeHDFstructs(sdfid, fid)) < 0) {
528  pwarning("Fatal error closing SDS: closeHDFstructs");
529  return (ERROR);
530  }
531 
532  return (result);
533 
534 } /* rdsds */
535 
536 /**********************************************************************
537  * SUBROUTINE: SDSinFile
538  *
539  * PURPOSE: assign attributes, add to Vgroup and deattach SDS
540  *
541  * AUTHOR: B.D.Schieber, GSC, 10/93
542  * Mods: BDS 5/19/95 Support SeaWiFS Specs 2.7
543  **********************************************************************/
544 
545 int32 SDSinFile(sdsname, longname, units, datafmt,
546  datatype, sdfid, rank, shape, data, gridid)
547 char *sdsname, *longname, *units, *datafmt;
548 int32 sdfid, datatype, rank, shape[], gridid;
549 void *data;
550 {
551  int result;
552  int32 sdsid;
553 
554  /*
555  * write SDS array
556  */
557 
558  if ((sdsid = wrtsds(sdfid, rank, shape, datatype, sdsname, data)) < 0) {
559  pwarning("wrtsds");
560  return (ERROR);
561  }
562 
563  /*
564  * set SDS attributes
565  */
566 
567  if ((result = addAttr(sdsid, "long_name", DFNT_CHAR, longname)) != 0) {
568  pwarning("addAttr");
569  return (ERROR);
570  }
571 
572  if (strlen(units) > 0) /* don't write "" attributes */
573  if ((result = addAttr(sdsid, "units", DFNT_CHAR, units)) != 0) {
574  pwarning("addAttr");
575  return (ERROR);
576  }
577 
578  /*
579  * add SDS to Vgroup and deattach SDS
580  */
581 
582  if ((result = setSDSref(sdsid, gridid)) != 0) {
583  pwarning("setSDSref");
584  return (ERROR);
585  }
586 
587  return 0;
588 
589 } /* SDSinFile */
590 
591 /*****************************************************************
592  * File: wrtattr
593  *
594  * Purpose: write DAAC style global attributes to an HDF file
595  *
596  * Description: string arrays of label/value pairs written to HDF
597  * header file.
598  *
599  * Input parms:
600  * dfile - HDF file id
601  * num - number of strings
602  *
603  * Output parms:none
604  *
605  * Returns: -1 on failure, 0 on success
606  *
607  * Local vars:
608  * int i - counter
609  * char outlabel[MAXLABLEN+1] - local label string
610  * char outdescr[MAXDESCLEN+1] - local description string
611  * int32 dfile - file id number
612  * int32 result - return value for HDF calls
613  *
614  * Subs called: HDF library routines
615  *
616  * Note: uses header (ancil.h) definitions for label length,
617  * description length, and name length
618  * uses argument setting for numannarr
619  *
620  * History: based on DAAC "Metadata Submission Guide" 2/93
621  *
622  * Author: Brian D. Schieber, GSC, 2/93
623  *
624  * Mod history:
625  * BDS, 8/30/93 - modified to work with new HDF design.
626  *
627  *****************************************************************/
628 
629 int wrtattr(dfile, annot, numannarr)
630 int32 dfile;
631 struct annotation *annot;
632 int numannarr;
633 {
634 
635  /*
636  * local variables
637  */
638 
639  char outlabel[MAXLABLEN + 1], outchar[MAXDESCLEN + 1];
640  int16 outint16[1];
641  int32 outint32[1];
642  float outfloat32[1];
643  int i = 0;
644  int32 result = 0;
645 
646  /*
647  * Place each label/description pair into HDF header
648  */
649 
650  for (i = 0; i < numannarr; i++) {
651 
652  /* printf ("label [%d] [%s]\n",i, annot[i].label); */
653  /* printf ("descr [%d] [%s]\n",i, annot[i].descr); */
654  strcpy(outlabel, annot[i].label);
655 
656  switch (annot[i].type) {
657  case (DFNT_CHAR8):
658  strcpy(outchar, annot[i].descr);
659  result = SDsetattr(dfile, outlabel, DFNT_CHAR8,
660  strlen(outchar) + 1, outchar);
661  break;
662 
663  case (DFNT_INT16):
664  /* strcpy (outchar, annot[i].descr); */
665  /* sscanf(&outchar[0], "%hd", &outint16[0]); */
666  sscanf(annot[i].descr, "%hd", &outint16[0]);
667  /* printf("outint16 [%hd]\n", outint16[0]); */
668 
669  result = SDsetattr(dfile, outlabel, DFNT_INT16, 1, outint16);
670  break;
671 
672  case (DFNT_INT32):
673  sscanf(annot[i].descr, "%d", &outint32[0]);
674  result = SDsetattr(dfile, outlabel, DFNT_INT32, 1, outint32);
675  break;
676 
677  case (DFNT_FLOAT32):
678  /* strcpy (outchar, annot[i].descr); */
679  /* sscanf(&outchar[0], "%f", &outfloat32[0]); */
680  sscanf(annot[i].descr, "%f", &outfloat32[0]);
681  /* printf("outfloat32 [%f]\n", outfloat32[0]); */
682  result = SDsetattr(dfile, outlabel, DFNT_FLOAT32, 1, outfloat32);
683  break;
684 
685  default:
686  printf("Error in function WRTATTR, default CASE encountered\n");
687  return (-1);
688  break;
689 
690  } /* end switch */
691  if (result) printf("Error in writing header annotations\n");
692  }
693  return (result);
694 } /* wrtattr */
695 
int closeHDFstructs(int32_t sdfid, int32_t fid)
Definition: ANCroutines.c:281
integer, parameter int16
Definition: cubeio.f90:3
#define SUCCESS
Definition: ObpgReadGrid.h:15
int addAttr(int32_t sdsid, char *dataattr, int32_t datatype, char *dataunit)
Definition: ANCroutines.c:222
int j
Definition: decode_rs.h:73
int32_t wrtsds(int32_t sdfid, int rank, shape, int32_t datatype, char *datalabel, void *data)
Definition: ANCroutines.c:346
#define GEOMCLASS
Definition: ancil.h:45
int32 gridToGrid(int32 outergridid, int32 innergridid)
Definition: ANCroutines.c:70
#define FAIL
Definition: ObpgReadGrid.h:18
#define NULL
Definition: decode_rs.h:63
int32 setupGrid(int32 fid, char *grpname)
Definition: ANCroutines.c:50
int32_t rewrtsds(int32_t sdsid, shape, void *data)
Definition: ANCroutines.c:400
#define MAXDESCLEN
Definition: ancil.h:42
README for MOD_PR02AQUA(AQUA) Version to set to For disabling creating and output data sets when in night mode
Definition: README.txt:96
int pwarning(char *string)
Definition: pexit.c:21
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_INT32
int32_t detachGeom(int32_t geomid)
Definition: ANCroutines.c:205
int32 linkGeom(int32 gridid, int32 geomid)
Definition: ANCroutines.c:186
char descr[MAXDESCLEN]
Definition: ancil.h:72
int deattachHDFgrid(int32_t gridid)
Definition: ANCroutines.c:267
int wrtattr(int32_t dfile, struct annotation *lannot, int numannarr)
Definition: ANCroutines.c:631
int32_t writeGeom(int32_t fid, int32_t gridid, char *geomname, int32_t bin_meth, int32_t registration, float vsize, float hsize, float max_north, float max_south, float max_west, float max_east)
Definition: ANCroutines.c:92
int32_t findGeomId(int32_t fid, char *geomname)
Definition: ANCroutines.c:162
#define MAXLABLEN
Definition: ancil.h:41
char filename[FILENAME_MAX]
Definition: atrem_corl1.h:122
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_INT16
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude data
Definition: HISTORY.txt:356
void pexit(char *string)
Definition: pexit.c:10
Extra metadata that will be written to the HDF4 file l2prod rank
int startHDF(char *outfile, int32 *sdfid, int32 *fid, int32 mode)
Definition: ANCroutines.c:26
struct annotation * annot
HDF4 data type of the output SDS Default is DFNT_FLOAT32 Common types used DFNT_FLOAT32
int setSDSref(int32_t sdsid, int32_t gridid)
Definition: ANCroutines.c:245
#define MAXNAMELNG
Definition: ancil.h:43
int rdsds(char *filename, char *vgname, char *sdsname, dimsizes, void *inData)
Definition: ANCroutines.c:458
int i
Definition: decode_rs.h:71
int32_t SDSinFile(char *sdsname, char *longname, char *units, char *datafmt, int32_t datatype, int32_t sdfid, int32_t rank, shape, void *data, int32_t gridid)
Definition: ANCroutines.c:547
How many dimensions is the output array Default is Not sure if anything above will work correctly strcpy(l2prod->title, "no title yet")
float32 f32
Definition: l2bin.cpp:104
#define ERROR
Definition: ancil.h:24
#define GEOMSIZE
Definition: ancil.h:46