OpenCPN Partial API docs
Loading...
Searching...
No Matches
xy_grib_model_def.cpp
Go to the documentation of this file.
1/***************************************************************************
2 * Copyright (C) 2024 by R. Demoment *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, see <https://www.gnu.org/licenses/>. *
16 ***************************************************************************/
17
24#include <wx/wx.h>
25#include "xy_grib_model_def.h"
26
27// ******** Atmospheric model definitions **********************************
28
29// GFS Model definition
30wxString gfsResolutions[] = {"0.25", "0.5", "1.0"};
31wxString gfsReqNames[] = {"gfs_p25_", "gfs_p50_", "gfs_1p0_"};
32int gfsInterval[] = {3, 6, 12};
33AtmModelDef_t xyGribGFSModelDef = {"GFS",
34 sizeof(gfsResolutions) / sizeof(wxString),
35 gfsResolutions,
36 gfsReqNames,
37 sizeof(gfsInterval) / sizeof(int),
38 gfsInterval,
39 10,
40 XYGRIB_RUN_ALL,
41 true, // Wind
42 true, // Gusts
43 true, // Pressure
44 false, // Alternative pressure
45 true, // Air temp
46 true, // CAPE
47 true, // Reflectivity
48 true, // Cloud cover
49 true}; // Rain fall
50
51// ICON Model definition
52wxString iconResolutions[] = {"0.25"};
53wxString iconReqNames[] = {"icon_p25_"};
54int iconInterval[] = {3, 6, 12};
55AtmModelDef_t xyGribICONModelDef = {"ICON",
56 sizeof(iconResolutions) / sizeof(wxString),
57 iconResolutions,
58 iconReqNames,
59 sizeof(iconInterval) / sizeof(int),
60 iconInterval,
61 8,
62 XYGRIB_RUN_0_12,
63 true, // Wind
64 true, // Gusts
65 true, // Pressure
66 false, // Alternative pressure
67 true, // Air temp
68 true, // CAPE
69 false, // Reflectivity
70 true, // Cloud cover
71 true}; // Rain fall
72
73// ARPEGE Model definition
74wxString arpegeResolutions[] = {"0.5"};
75wxString arpegeReqNames[] = {"arpege_p50_"};
76int arpegeInterval[] = {3, 6, 12};
77AtmModelDef_t xyGribARPEGEModelDef = {
78 "ARPEGE",
79 sizeof(arpegeResolutions) / sizeof(wxString),
80 arpegeResolutions,
81 arpegeReqNames,
82 sizeof(arpegeInterval) / sizeof(int),
83 arpegeInterval,
84 4,
85 XYGRIB_RUN_0_12,
86 true, // Wind
87 true, // Gusts
88 true, // Pressure
89 false, // Alternative pressure
90 true, // Air temp
91 true, // CAPE
92 false, // Reflectivity
93 true, // Cloud cover
94 true}; // Rain fall
95
96// ECMWF Model definition
97wxString ecmwfResolutions[] = {"0.5"};
98wxString ecmwfReqNames[] = {"ecmwf_p50_"};
99int ecmwfInterval[] = {24};
100AtmModelDef_t xyGribECMWFModelDef = {
101 "ECMWF",
102 sizeof(ecmwfResolutions) / sizeof(wxString),
103 ecmwfResolutions,
104 ecmwfReqNames,
105 sizeof(ecmwfInterval) / sizeof(int),
106 ecmwfInterval,
107 10,
108 XYGRIB_RUN_0_12,
109 false, // Wind
110 false, // Gusts
111 false, // Pressure
112 true, // Alternative pressure
113 false, // Air temp
114 false, // CAPE
115 false, // Reflectivity
116 false, // Cloud cover
117 false}; // Rain fall
118
119// ICON-EU Model definition
120wxString iconEuResolutions[] = {"0.06"};
121wxString iconEuReqNames[] = {"icon_eu_p06_"};
122int iconEuInterval[] = {1, 3, 6, 12};
123AtmModelDef_t xyGribICONEUModelDef = {
124 "ICON-EU",
125 sizeof(iconEuResolutions) / sizeof(wxString),
126 iconEuResolutions,
127 iconEuReqNames,
128 sizeof(iconEuInterval) / sizeof(int),
129 iconEuInterval,
130 4,
131 XYGRIB_RUN_ALL,
132 true, // Wind
133 true, // Gusts
134 true, // Pressure
135 false, // Alternative pressure
136 true, // Air temp
137 true, // CAPE
138 false, // Reflectivity
139 true, // Cloud cover
140 true}; // Rain fall
141
142// AREPGE-HD Model definition
143wxString arpegeHDResolutions[] = {"0.06"};
144wxString arpegeHDReqNames[] = {"arpege_eu_p10_"};
145int arpegeHDInterval[] = {1, 3, 6, 12};
146AtmModelDef_t xyGribARPEGEHDModelDef = {
147 "ARPEGE-HD",
148 sizeof(arpegeHDResolutions) / sizeof(wxString),
149 arpegeHDResolutions,
150 arpegeHDReqNames,
151 sizeof(arpegeHDInterval) / sizeof(int),
152 arpegeHDInterval,
153 4,
154 XYGRIB_RUN_ALL,
155 true, // Wind
156 true, // Gusts
157 true, // Pressure
158 false, // Alternative pressure
159 true, // Air temp
160 false, // CAPE
161 false, // Reflectivity
162 true, // Cloud cover
163 true}; // Rain fall
164
165// AROME Model definition
166wxString aromeResolutions[] = {"0.025"};
167wxString aromeReqNames[] = {"arome_p025_"};
168int aromeInterval[] = {1, 3, 6, 12};
169AtmModelDef_t xyGribAROMEModelDef = {
170 "AROME",
171 sizeof(aromeResolutions) / sizeof(wxString),
172 aromeResolutions,
173 aromeReqNames,
174 sizeof(aromeInterval) / sizeof(int),
175 aromeInterval,
176 2,
177 XYGRIB_RUN_ALL,
178 true, // Wind
179 true, // Gusts
180 true, // Pressure
181 false, // Alternative pressure
182 true, // Air temp
183 false, // CAPE
184 false, // Reflectivity
185 true, // Cloud cover
186 true}; // Rain fall
187
188// NAM-CONUS Model definition
189wxString namConusResolutions[] = {"0.11"};
190wxString namConusReqNames[] = {"nam_conus_12km_"};
191int namConusInterval[] = {1, 3, 6, 12};
192AtmModelDef_t xyGribNAMCONUSModelDef = {
193 "NAM-CONUS",
194 sizeof(namConusResolutions) / sizeof(wxString),
195 namConusResolutions,
196 namConusReqNames,
197 sizeof(namConusInterval) / sizeof(int),
198 namConusInterval,
199 2,
200 XYGRIB_RUN_ALL,
201 true, // Wind
202 true, // Gusts
203 true, // Pressure
204 false, // Alternative pressure
205 true, // Air temp
206 true, // CAPE
207 true, // Reflectivity
208 true, // Cloud cover
209 true}; // Rain fall
210
211// NAM-CACBN Model definition
212wxString namCacbnResolutions[] = {"0.11"};
213wxString namCacbnReqNames[] = {"nam_cacbn_12km_"};
214int namCacbnInterval[] = {3};
215AtmModelDef_t xyGribNAMCACBNModelDef = {
216 "NAM-CACBN",
217 sizeof(namCacbnResolutions) / sizeof(wxString),
218 namCacbnResolutions,
219 namCacbnReqNames,
220 sizeof(namCacbnInterval) / sizeof(int),
221 namCacbnInterval,
222 4,
223 XYGRIB_RUN_ALL,
224 true, // Wind
225 false, // Gusts
226 true, // Pressure
227 false, // Alternative pressure
228 true, // Air temp
229 true, // CAPE
230 true, // Reflectivity
231 true, // Cloud cover
232 true}; // Rain fall
233
234// NAM-PACIFIC Model definition
235wxString namPacificResolutions[] = {"0.11"};
236wxString namPacificReqNames[] = {"nam_pacific_12km_"};
237int namPacificInterval[] = {3};
238AtmModelDef_t xyGribNAMPACIFICModelDef = {
239 "NAM-PACIFIC",
240 sizeof(namPacificResolutions) / sizeof(wxString),
241 namPacificResolutions,
242 namPacificReqNames,
243 sizeof(namPacificInterval) / sizeof(int),
244 namPacificInterval,
245 4,
246 XYGRIB_RUN_ALL,
247 true, // Wind
248 false, // Gusts
249 true, // Pressure
250 false, // Alternative pressure
251 true, // Air temp
252 true, // CAPE
253 true, // Reflectivity
254 true, // Cloud cover
255 true}; // Rain fall
256
257AtmModelDef_t *xygribAtmModelList[] = {&xyGribGFSModelDef,
258 &xyGribICONModelDef,
259 &xyGribARPEGEModelDef,
260 &xyGribECMWFModelDef,
261 &xyGribICONEUModelDef,
262 &xyGribARPEGEHDModelDef,
263 &xyGribAROMEModelDef,
264 &xyGribNAMCONUSModelDef,
265 &xyGribNAMCACBNModelDef,
266 &xyGribNAMPACIFICModelDef,
267 nullptr};
268
269// ******** Wave model definitions *****************************************
270
271WaveModelDef_t xyGribWW3ModelDef = {"WW3", "ww3_p50_",
272 true, // Significant height
273 true}; // Wind waves
274
275WaveModelDef_t xyGribGWAMModelDef = {"GWAM", "gwam_p25_",
276 true, // Significant height
277 true}; // Wind waves
278
279WaveModelDef_t xyGribEWAMModelDef = {"EWAM", "ewam_p05_",
280 true, // Significant height
281 true}; // Wind waves
282
283WaveModelDef_t *xygribWaveModelList[] = {
284 &xyGribWW3ModelDef, &xyGribGWAMModelDef, &xyGribEWAMModelDef, nullptr};
XyGrib Model Configuration and Definitions.