-
Notifications
You must be signed in to change notification settings - Fork 7
/
ggrd_base.h
78 lines (59 loc) · 1.58 KB
/
ggrd_base.h
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
#ifndef __READ_GGRD_HEADER__
//
// max order of interpolation - 1
// ie. if 3, this means will do fourth order on 0,1,2,GGRD_DEF_ORDER arrays
#define GGRD_MAX_ORDER 5
// order of derivatives needed in general for the weighting routine
#define GGRD_MAX_IORDER 1
#define GGRD_MAX_ORDERP1 (GGRD_MAX_ORDER+1)
#define GGRD_MAX_IORDERP1 (GGRD_MAX_IORDER+1)
#ifndef GGRD_CPREC /*
precision for most C functions
*/
#define GGRD_CPREC double
#define GGRD_EPS 5e-15
#define ggrd_boolean unsigned char
#ifndef HC_FLT_FORMAT
#define HC_FLT_FORMAT "%lf"
#endif
#endif
/* string length */
#ifndef HC_CHAR_LENGTH
#define GGRD_CHAR_LENGTH 1000
#else
#define GGRD_CHAR_LENGTH HC_CHAR_LENGTH
#endif
/* errors */
#define GGRD_PE(x) {fprintf(stderr,"ggrd: %s\n",x);}
#define GGRD_MEMERROR(x) {fprintf(stderr,"%s: memory allocation error, exiting\n",x);exit(-1);}
/* radius of CMB */
#define GGRD_RCMB_ND 0.546225
#ifdef M_PI
#define GGRD_PI M_PI
#else
#define GGRD_PI 3.1415926535897932384626433832795
#endif
#ifndef GGRD_TWOPI
#define GGRD_TWOPI 6.283185307179586476925286766559005768394
#endif
/* 180/pi */
#ifndef GGRD_PIF
#define GGRD_PIF 57.295779513082320876798154814105
#endif
#ifdef HC_RE_KM
#define GGRD_RADIUS_E_KM HC_RE_KM
#else
#define GGRD_RADIUS_E_KM 6371.0
#endif
/*
modes
*/
#define GGRD_NORMAL 0
#define GGRD_ONLY_VEL_STATS 1
#include "ggrd_struc.h"
/* filenames */
#define GGRD_VSFILE "vrms.dat" /* vel stat file */
#define GGRD_THFILE "vtimes.dat" /* times for velocities */
#define GGRD_DFILE "vdepth.dat" /* depth layer file */
#define __READ_GGRD_HEADER__
#endif