-
Notifications
You must be signed in to change notification settings - Fork 22
/
tc_pairs_conf_info.h
151 lines (110 loc) · 3.97 KB
/
tc_pairs_conf_info.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
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
// ** Copyright UCAR (c) 1992 - 2022
// ** University Corporation for Atmospheric Research (UCAR)
// ** National Center for Atmospheric Research (NCAR)
// ** Research Applications Lab (RAL)
// ** P.O.Box 3000, Boulder, Colorado, 80307-3000, USA
// *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
////////////////////////////////////////////////////////////////////////
#ifndef __TC_PAIRS_CONF_INFO_H__
#define __TC_PAIRS_CONF_INFO_H__
////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <map>
#include "mask_poly.h"
#include "vx_config.h"
#include "vx_util.h"
#include "vx_grid.h"
////////////////////////////////////////////////////////////////////////
struct ConsensusInfo {
ConcatString Name;
StringArray Members;
NumArray Required;
int MinReq;
bool WriteMembers;
};
////////////////////////////////////////////////////////////////////////
struct DiagInfo {
ConcatString TrackSource;
ConcatString FieldSource;
StringArray MatchToTrack;
StringArray DiagName;
void clear();
};
////////////////////////////////////////////////////////////////////////
class TCPairsConfInfo {
private:
void init_from_scratch();
public:
// TCPairs configuration object
MetConfig Conf;
// User-defined description
ConcatString Desc;
// Track filtering criteria
StringArray Model; // List of model names
StringArray StormId; // List of storm ids
StringArray Basin; // List of basin names
StringArray Cyclone; // List of cyclone numbers
StringArray StormName; // List of storm names
StringArray SkipConsensusMembers; // List of consensus members to skip output for
// Timing information
unixtime InitBeg, InitEnd;
TimeArray InitInc;
TimeArray InitExc;
NumArray InitHour;
NumArray LeadReq;
unixtime ValidBeg, ValidEnd;
TimeArray ValidInc;
TimeArray ValidExc;
TimeArray WriteValid;
// Polyline masking regions
ConcatString InitMaskName;
MaskPoly InitPolyMask;
Grid InitGridMask;
MaskPlane InitAreaMask;
ConcatString ValidMaskName;
MaskPoly ValidPolyMask;
Grid ValidGridMask;
MaskPlane ValidAreaMask;
// Check for duplicate ATCFTrackLines
bool CheckDup;
// 12-hour track interpolation logic
Interp12Type Interp12;
// Consensus model definition
int NConsensus; // Number of consensus models
ConsensusInfo *Consensus; // Consensus model definition
// Time-lagged track definition
NumArray LagTime;
// CLIPER/SHIFOR baseline model definition along with BEST
// and operational technique names
StringArray BestTechnique;
StringArray BestBaseline;
StringArray OperTechnique;
StringArray OperBaseline;
// Analysis track datasets
TrackType AnlyTrack;
// Only retain TrackPoints in both the ADECK and BDECK tracks
bool MatchPoints;
// Gridded data file containing distances to land
ConcatString DLandFile;
// ASCII watch/warnings file
ConcatString WatchWarnFile;
// Watch/warnings time offset
int WatchWarnOffset;
// Diagnostics metadata
std::map<ConcatString,DiagInfo> DiagInfoMap;
// Diagnostic conversions
std::map< ConcatString,std::map<ConcatString,UserFunc_1Arg> > DiagConvertMap;
// Basin Map
std::map<ConcatString,ConcatString> BasinMap;
// Config file version
ConcatString Version;
TCPairsConfInfo();
~TCPairsConfInfo();
void clear();
void read_config(const char *, const char *);
void process_config();
};
////////////////////////////////////////////////////////////////////////
#endif /* __TC_PAIRS_CONF_INFO_H__ */
////////////////////////////////////////////////////////////////////////