OpenCPN Partial API docs
Loading...
Searching...
No Matches
XyGribModelDef.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, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
23#include <wx/wx.h>
24#include "XyGribModelDef.h"
25
26// ******** Atmospheric model definitions **********************************
27
28// GFS Model definition
29wxString gfsResolutions[] = {"0.25", "0.5", "1.0"};
30wxString gfsReqNames[] = {"gfs_p25_", "gfs_p50_", "gfs_1p0_"};
31int gfsInterval[] = {3, 6, 12};
32AtmModelDef_t xyGribGFSModelDef = {"GFS",
33 sizeof(gfsResolutions) / sizeof(wxString),
34 gfsResolutions,
35 gfsReqNames,
36 sizeof(gfsInterval) / sizeof(int),
37 gfsInterval,
38 10,
39 XYGRIB_RUN_ALL,
40 true, // Wind
41 true, // Gusts
42 true, // Pressure
43 false, // Alternative pressure
44 true, // Air temp
45 true, // CAPE
46 true, // Reflectivity
47 true, // Cloud cover
48 true}; // Rain fall
49
50// ICON Model definition
51wxString iconResolutions[] = {"0.25"};
52wxString iconReqNames[] = {"icon_p25_"};
53int iconInterval[] = {3, 6, 12};
54AtmModelDef_t xyGribICONModelDef = {"ICON",
55 sizeof(iconResolutions) / sizeof(wxString),
56 iconResolutions,
57 iconReqNames,
58 sizeof(iconInterval) / sizeof(int),
59 iconInterval,
60 8,
61 XYGRIB_RUN_0_12,
62 true, // Wind
63 true, // Gusts
64 true, // Pressure
65 false, // Alternative pressure
66 true, // Air temp
67 true, // CAPE
68 false, // Reflectivity
69 true, // Cloud cover
70 true}; // Rain fall
71
72// ARPEGE Model definition
73wxString arpegeResolutions[] = {"0.5"};
74wxString arpegeReqNames[] = {"arpege_p50_"};
75int arpegeInterval[] = {3, 6, 12};
76AtmModelDef_t xyGribARPEGEModelDef = {
77 "ARPEGE",
78 sizeof(arpegeResolutions) / sizeof(wxString),
79 arpegeResolutions,
80 arpegeReqNames,
81 sizeof(arpegeInterval) / sizeof(int),
82 arpegeInterval,
83 4,
84 XYGRIB_RUN_0_12,
85 true, // Wind
86 true, // Gusts
87 true, // Pressure
88 false, // Alternative pressure
89 true, // Air temp
90 true, // CAPE
91 false, // Reflectivity
92 true, // Cloud cover
93 true}; // Rain fall
94
95// ECMWF Model definition
96wxString ecmwfResolutions[] = {"0.5"};
97wxString ecmwfReqNames[] = {"ecmwf_p50_"};
98int ecmwfInterval[] = {24};
99AtmModelDef_t xyGribECMWFModelDef = {
100 "ECMWF",
101 sizeof(ecmwfResolutions) / sizeof(wxString),
102 ecmwfResolutions,
103 ecmwfReqNames,
104 sizeof(ecmwfInterval) / sizeof(int),
105 ecmwfInterval,
106 10,
107 XYGRIB_RUN_0_12,
108 false, // Wind
109 false, // Gusts
110 false, // Pressure
111 true, // Alternative pressure
112 false, // Air temp
113 false, // CAPE
114 false, // Reflectivity
115 false, // Cloud cover
116 false}; // Rain fall
117
118// ICON-EU Model definition
119wxString iconEuResolutions[] = {"0.06"};
120wxString iconEuReqNames[] = {"icon_eu_p06_"};
121int iconEuInterval[] = {1, 3, 6, 12};
122AtmModelDef_t xyGribICONEUModelDef = {
123 "ICON-EU",
124 sizeof(iconEuResolutions) / sizeof(wxString),
125 iconEuResolutions,
126 iconEuReqNames,
127 sizeof(iconEuInterval) / sizeof(int),
128 iconEuInterval,
129 4,
130 XYGRIB_RUN_ALL,
131 true, // Wind
132 true, // Gusts
133 true, // Pressure
134 false, // Alternative pressure
135 true, // Air temp
136 true, // CAPE
137 false, // Reflectivity
138 true, // Cloud cover
139 true}; // Rain fall
140
141// AREPGE-HD Model definition
142wxString arpegeHDResolutions[] = {"0.06"};
143wxString arpegeHDReqNames[] = {"arpege_eu_p10_"};
144int arpegeHDInterval[] = {1, 3, 6, 12};
145AtmModelDef_t xyGribARPEGEHDModelDef = {
146 "ARPEGE-HD",
147 sizeof(arpegeHDResolutions) / sizeof(wxString),
148 arpegeHDResolutions,
149 arpegeHDReqNames,
150 sizeof(arpegeHDInterval) / sizeof(int),
151 arpegeHDInterval,
152 4,
153 XYGRIB_RUN_ALL,
154 true, // Wind
155 true, // Gusts
156 true, // Pressure
157 false, // Alternative pressure
158 true, // Air temp
159 false, // CAPE
160 false, // Reflectivity
161 true, // Cloud cover
162 true}; // Rain fall
163
164// AROME Model definition
165wxString aromeResolutions[] = {"0.025"};
166wxString aromeReqNames[] = {"arome_p025_"};
167int aromeInterval[] = {1, 3, 6, 12};
168AtmModelDef_t xyGribAROMEModelDef = {
169 "AROME",
170 sizeof(aromeResolutions) / sizeof(wxString),
171 aromeResolutions,
172 aromeReqNames,
173 sizeof(aromeInterval) / sizeof(int),
174 aromeInterval,
175 2,
176 XYGRIB_RUN_ALL,
177 true, // Wind
178 true, // Gusts
179 true, // Pressure
180 false, // Alternative pressure
181 true, // Air temp
182 false, // CAPE
183 false, // Reflectivity
184 true, // Cloud cover
185 true}; // Rain fall
186
187// NAM-CONUS Model definition
188wxString namConusResolutions[] = {"0.11"};
189wxString namConusReqNames[] = {"nam_conus_12km_"};
190int namConusInterval[] = {1, 3, 6, 12};
191AtmModelDef_t xyGribNAMCONUSModelDef = {
192 "NAM-CONUS",
193 sizeof(namConusResolutions) / sizeof(wxString),
194 namConusResolutions,
195 namConusReqNames,
196 sizeof(namConusInterval) / sizeof(int),
197 namConusInterval,
198 2,
199 XYGRIB_RUN_ALL,
200 true, // Wind
201 true, // Gusts
202 true, // Pressure
203 false, // Alternative pressure
204 true, // Air temp
205 true, // CAPE
206 true, // Reflectivity
207 true, // Cloud cover
208 true}; // Rain fall
209
210// NAM-CACBN Model definition
211wxString namCacbnResolutions[] = {"0.11"};
212wxString namCacbnReqNames[] = {"nam_cacbn_12km_"};
213int namCacbnInterval[] = {3};
214AtmModelDef_t xyGribNAMCACBNModelDef = {
215 "NAM-CACBN",
216 sizeof(namCacbnResolutions) / sizeof(wxString),
217 namCacbnResolutions,
218 namCacbnReqNames,
219 sizeof(namCacbnInterval) / sizeof(int),
220 namCacbnInterval,
221 4,
222 XYGRIB_RUN_ALL,
223 true, // Wind
224 false, // Gusts
225 true, // Pressure
226 false, // Alternative pressure
227 true, // Air temp
228 true, // CAPE
229 true, // Reflectivity
230 true, // Cloud cover
231 true}; // Rain fall
232
233// NAM-PACIFIC Model definition
234wxString namPacificResolutions[] = {"0.11"};
235wxString namPacificReqNames[] = {"nam_pacific_12km_"};
236int namPacificInterval[] = {3};
237AtmModelDef_t xyGribNAMPACIFICModelDef = {
238 "NAM-PACIFIC",
239 sizeof(namPacificResolutions) / sizeof(wxString),
240 namPacificResolutions,
241 namPacificReqNames,
242 sizeof(namPacificInterval) / sizeof(int),
243 namPacificInterval,
244 4,
245 XYGRIB_RUN_ALL,
246 true, // Wind
247 false, // Gusts
248 true, // Pressure
249 false, // Alternative pressure
250 true, // Air temp
251 true, // CAPE
252 true, // Reflectivity
253 true, // Cloud cover
254 true}; // Rain fall
255
256AtmModelDef_t *xygribAtmModelList[] = {&xyGribGFSModelDef,
257 &xyGribICONModelDef,
258 &xyGribARPEGEModelDef,
259 &xyGribECMWFModelDef,
260 &xyGribICONEUModelDef,
261 &xyGribARPEGEHDModelDef,
262 &xyGribAROMEModelDef,
263 &xyGribNAMCONUSModelDef,
264 &xyGribNAMCACBNModelDef,
265 &xyGribNAMPACIFICModelDef,
266 nullptr};
267
268// ******** Wave model definitions *****************************************
269
270WaveModelDef_t xyGribWW3ModelDef = {"WW3", "ww3_p50_",
271 true, // Significant height
272 true}; // Wind waves
273
274WaveModelDef_t xyGribGWAMModelDef = {"GWAM", "gwam_p25_",
275 true, // Significant height
276 true}; // Wind waves
277
278WaveModelDef_t xyGribEWAMModelDef = {"EWAM", "ewam_p05_",
279 true, // Significant height
280 true}; // Wind waves
281
282WaveModelDef_t *xygribWaveModelList[] = {
283 &xyGribWW3ModelDef, &xyGribGWAMModelDef, &xyGribEWAMModelDef, nullptr};
XyGrib Model Configuration and Definitions.