-
Notifications
You must be signed in to change notification settings - Fork 7
/
ggrd_struc.h
181 lines (128 loc) · 3.66 KB
/
ggrd_struc.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
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
/*
structure for GGRD stuff (scalar and velocity interpolation)
*/
#ifndef __GGRD_STRUC_INIT__
#ifndef __GMT_INCLUDED__
#include "gmt.h"
#define __GMT_INCLUDED__
#endif
#include "prem.h"
/*
plate tectonic stages interpolation structure
*/
struct ggrd_t{
char file[GGRD_CHAR_LENGTH]; /* filename */
GGRD_CPREC *vtimes; /* times at which velocities or materials
are specified. this will hold
t_left t_mid t_right
....
*/
int nvtimes,nvtimes3; /* number of times where specified,
and that number times 3 */
GGRD_CPREC tmin,tmax; /* range of times */
ggrd_boolean init;
GGRD_CPREC xllimit,xrlimit;
GGRD_CPREC f1_loc,f2_loc,time_old;
int ileft_loc,iright_loc,ntlim;
GGRD_CPREC vstage_transition;
ggrd_boolean interpol_time_lin;
GGRD_CPREC *tl; /* for linear interpolation */
ggrd_boolean called;
};
/*
several GMT grid file structure
*/
struct ggrd_gt{
/*
grd info
*/
struct GRD_HEADER *grd;
struct GMT_EDGEINFO *edgeinfo;
/*
data
*/
float *f,*fmaxlim,bandlim;
int mm;
float *z; /* depth levels */
int nz;
ggrd_boolean zlevels_are_negative;
ggrd_boolean init,geographic_in,
is_three; /* is it a 3-D set? */
double west,east,south,north;
#ifndef USE_GMT3
struct GMT_BCR loc_bcr[1];
#else
struct BCR loc_bcr[1];
#endif
};
/* velocity interpolation structure */
struct ggrd_vip{
int ider[1+3*GGRD_MAX_IORDER],istencil[3],
ixtracer[3],old_order,orderp1,isshift[3];
ggrd_boolean init,reduce_r_stencil,z_warned,w_warned;
};
/*
structure for 3-D velocity interpolation
*/
struct ggrd_vel{
GGRD_CPREC *vr,*vt,*vp; /* velocity field */
int n[5]; /* dimensions in r, theta, and
phi directions */
int ntnp,nrntnp; /* */
GGRD_CPREC *rlevels; /* levels where velocities are
specified */
GGRD_CPREC dtheta,dphi; /* spacing in theta and phi */
GGRD_CPREC velscale,rcmb;
ggrd_boolean init, /* initialized? */
history, /* time-dependent? */
read_gmt; /* read GMT grd files or binary format?*/
ggrd_boolean rl_warned,vd_init,vd_reduce_r_stencil; /* */
struct ggrd_vip vd; /* velocity interpolation structure */
};
struct ggrd_temp_init{
/*
for temperature init from grd files
*/
int init,scale_with_prem;
int override_tbc,limit_trange;
double scale,offset;
char gfile[GGRD_CHAR_LENGTH];
char dfile[GGRD_CHAR_LENGTH];
struct ggrd_gt d[1]; /* grid structure */
struct prem_model prem; /* PREM model */
};
struct ggrd_master{ /* master structure */
/* citcom use flags */
int mat_control,mat_control_init;
int ray_control,ray_control_init;
int vtop_control,vtop_control_init;
int age_control,age_control_init;
char mat_file[GGRD_CHAR_LENGTH];
char ray_file[GGRD_CHAR_LENGTH];
char vtop_dir[GGRD_CHAR_LENGTH];
char age_dir[GGRD_CHAR_LENGTH];
/* grid structures */
struct ggrd_gt *mat; /* material grids */
/* rayleigh number grids */
struct ggrd_gt *ray;
/* surface velocity */
struct ggrd_gt *svp,*svt; /* phi/theta surface velocities */
/* age stuff */
struct ggrd_gt *ages;
int nage,amode;
GGRD_CPREC *age_time; /* times */
float age_bandlim; /* bandlim for age to decide on
continent */
unsigned short sf_init; /* seafloor stuff */
GGRD_CPREC sf_old_age,sf_old_f1,sf_old_f2;
int sf_old_left,sf_old_right,sf_ntlim;
struct ggrd_vel v; /* 3D velocity grid structure */
/* time history */
struct ggrd_t time_hist; /* time history structure */
/* temperature init */
struct ggrd_temp_init temp;int use_temp;
/* composition init */
struct ggrd_temp_init comp;int use_comp;
};
#define __GGRD_STRUC_INIT__
#endif