-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathewdefs.h
81 lines (72 loc) · 1.55 KB
/
ewdefs.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
#ifndef EWDEFS_H
#define EWDEFS_H
#ifdef EW_GPU_ENABLED
#include <cstddef>
#endif
#define MAX_VARS_PER_NODE 12
#define iD 0
#define iH 1
#define iHmax 2
#define iM 3
#define iN 4
#define iR1 5
#define iR2 6
#define iR3 7
#define iR4 8
#define iR5 9
#define iTime 10
#define iTopo 11
// Global data
struct EWPARAMS {
char *modelName;
char *modelSubset;
char *fileBathymetry;
char *fileSource;
char *filePOIs;
int dt;
int time;
int timeMax;
int poiDt;
int poiReport;
int outDump;
int outProgress;
int outPropagation;
int coriolis;
float dmin;
float poiDistMax;
float poiDepthMin;
float poiDepthMax;
float ssh0ThresholdRel;
float ssh0ThresholdAbs;
float sshClipThreshold;
float sshZeroThreshold;
float sshTransparencyThreshold;
float sshArrivalThreshold;
bool gpu;
bool adjustZtop;
bool verbose;
#ifdef EW_GPU_ENABLED
/* execution environment parameters (for GPUs) */
std::size_t threads_x, threads_y, threads_total;
#endif
};
int ewStep();
int ewStepCor();
extern struct EWPARAMS Par;
extern int NLon,NLat;
extern double LonMin,LonMax,LatMin,LatMax;
extern double DLon,DLat; // steps in grad
extern double Dx,Dy; // steps in m, dx must be multiplied by cos(y) before use
extern float *R6;
extern float *C1;
extern float *C2;
extern float *C3;
extern float *C4;
extern int Imin;
extern int Imax;
extern int Jmin;
extern int Jmax;
#define idx(j,i) ((i-1)*NLat+j-1)
#define getLon(i) (LonMin+(i-1)*DLon)
#define getLat(j) (LatMin+(j-1)*DLat)
#endif /* EWDEFS_H */