-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathConfigConstants
171 lines (144 loc) · 3.61 KB
/
ConfigConstants
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
////////////////////////////////////////////////////////////////////////////////
//
// Settings applied to all MET tools.
//
////////////////////////////////////////////////////////////////////////////////
// Warning message results in tool exiting.
exit_on_warning = FALSE;
// NetCDF Compression per variable (0 to 9, 0: disable compression)
// This will be overridden by the environment variable MET_NC_COMPRESS and the
// command line argument.
nc_compression = 0;
// Precision for output statistics written by the MET tools.
output_precision = 5;
// Temporary directory. This will be overridden by the environment variable
// MET_TMP_DIR.
tmp_dir = "/tmp";
////////////////////////////////////////////////////////////////////////////////
//
// Standard unit conversion functions.
//
////////////////////////////////////////////////////////////////////////////////
K_to_C(t) = t - 273.15;
C_to_K(t) = t + 273.15;
C_to_F(t) = 1.8 * t + 32.0;
F_to_C(t) = (5.0 / 9.0) * ( t - 32.0 );
K_to_F(t) = C_to_F(K_to_C(t));
F_to_K(t) = C_to_K(F_to_C(t));
MM_to_IN(x) = x / 25.4;
IN_to_MM(x) = x * 25.4;
PA_to_HPA(p) = p / 100.0;
HPA_to_PA(p) = p * 100.0;
PA_to_MB(p) = PA_to_HPA(p);
MB_to_PA(p) = HPA_to_PA(p);
////////////////////////////////////////////////////////////////////////////////
//
// Defintion of constants used throughout MET configuration files.
//
// THE FOLLOWING SHOULD NOT BE MODIFIED. DOING SO WILL MAKE THE MET
// CONFIGURATION FILES UNREADABLE.
//
////////////////////////////////////////////////////////////////////////////////
// File types
GRIB1 = 1;
GRIB2 = 2;
NETCDF_MET = 3;
NETCDF_PINT = 4;
NETCDF_NCCF = 5;
PYTHON_NUMPY = 6;
PYTHON_XARRAY = 7;
// Set Logic
NONE = 1;
UNION = 2;
INTERSECTION = 3;
SYMDIFF = 4;
// Interpolation method
NONE = 1;
NEAREST = 2;
MEDIAN = 3;
UW_MEAN = 4;
DW_MEAN = 5;
LS_FIT = 6;
BILIN = 7;
NBRHD = 8;
NEAREST = 9;
BUDGET = 10;
FORCE = 11;
BEST = 12;
UPPER_LEFT = 13;
UPPER_RIGHT = 14;
LOWER_RIGHT = 15;
LOWER_LEFT = 16;
PERC = 17;
MIN = 18;
MAX = 19;
AW_MEAN = 20;
GAUSSIAN = 21;
MAXGAUSS = 22;
GEOG_MATCH = 23;
// Interpolation types
NONE = 1;
BOTH = 2;
FCST = 3;
OBS = 4;
// Interpolation Shapes
SQUARE = 1;
CIRCLE = 2;
// Track types
NONE = 1;
BOTH = 2;
ADECK = 3;
BDECK = 4;
// Interp12 types
NONE = 1;
FILL = 2;
REPLACE = 3;
// Output flag values
NONE = 1;
BOTH = 2;
STAT = 3;
// Bootstrapping interval type
PCTILE = 1;
BCA = 2;
// Grid weight flag settings
NONE = 1;
COS_LAT = 2;
AREA = 3;
// Duplicate flag settings
NONE = 1;
UNIQUE = 2;
// Grid decomposition flag settings
NONE = 1;
AUTO = 2;
TILE = 3;
PAD = 4;
// Wavelet types
NONE = 1;
HAAR = 2;
HAAR_CNTR = 3;
DAUB = 4;
DAUB_CNTR = 5;
BSPLINE = 6;
BSPLINE_CNTR = 7;
// MODE merging types
NONE = 1;
BOTH = 2;
THRESH = 3;
ENGINE = 4;
// MODE matching types
NONE = 1;
MERGE_BOTH = 2;
MERGE_FCST = 3;
NO_MERGE = 4;
// Distribution types
NONE = 1;
NORMAL = 2;
LOGNORMAL = 3;
EXPONENTIAL = 4;
CHISQUARED = 5;
GAMMA = 6;
UNIFORM = 7;
BETA = 8;
// PB2NC event stack
TOP = TRUE;
BOTTOM = FALSE;