WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
MosData.h
1#ifndef _WINC_MOSDATA
2#define _WINC_MOSDATA
3
4#include <WXP/Date.h>
5#include <WXP/EarthPoint.h>
6#include <WXP/String.h>
7
8namespace WXP {
9 class MosData {
10 public:
11 static const int NumData = 45;
12 private:
13 char id[7]; /* Station identifier */
14 float lat; /* Latitude */
15 float lon; /* Longitude */
16 float elev; /* Elevation */
17 Date date; /* Initial time of data */
18
19 int model; /* The model used in the data */
20 int num; /* The number of forecasts */
21 int hour[NumData]; /* The hour offset */
22 int t[NumData]; /* The temperature */
23 int td[NumData]; /* The dewpoint */
24 int wdir[NumData]; /* The wind direction */
25 int wspd[NumData]; /* The wind speed */
26 int pop6[NumData]; /* The 6 hour probability of precipitation */
27 int pop12[NumData]; /* The 12 hour probability of precipitation */
28 int pop24[NumData]; /* The 24 hour probability of precipitation */
29 int pot6[NumData]; /* The 6 hour probability of thunderstorms */
30 int pot12[NumData]; /* The 12 hour probability of thunderstorms */
31 int pot24[NumData]; /* The 24 hour probability of thunderstorms */
32 int post6[NumData]; /* The 6 hour prob of severe thunderstorms */
33 int post12[NumData]; /* The 12 hour prob of severe thunderstorms */
34 int pozp[NumData]; /* The prob of freezing precip */
35 int posn[NumData]; /* The prob of frozen precip */
36 char ptype[NumData]; /* The precipitation type */
37 int tmax[NumData]; /* The max temperature */
38 int tmin[NumData]; /* The min temperature */
39 char cover[NumData]; /* The cloud cover */
40 int ceil[NumData]; /* The cloud ceiling */
41 int vis[NumData]; /* The visibility */
42 char obvis[NumData][3]; /* The obscuration to visibility */
43 int qpf6[NumData]; /* The 6 hour quantitative precipitation */
44 int qpf12[NumData]; /* The 12 hour quantitative precipitation */
45 int qpf24[NumData]; /* The 24 hour quantitative precipitation */
46 int qsf6[NumData]; /* The 6 hour quantitative snow */
47 int qsf12[NumData]; /* The 12 hour quantitative snow */
48 int qsf24[NumData]; /* The 24 hour quantitative snow */
49
50 int nmax; /* The normal max temperature */
51 int nmin; /* The normal min temperature */
52 int npop; /* The normal prob of precip */
53
54 public:
55 enum Model { NONE, NGM, AVN, GFS, ETA, NAM, MRF, GFSX, LFM, LAMP };
56
57 MosData();
58 int init();
59 int setId( const char *rid );
60 int setId( const char *rid, float rlat, float rlon );
61 const char *getId();
62 int getLoc( float &rlat, float &rlon );
63 int getLoc( EarthPoint &ept );
66 inline float getLat(){ return lat; };
68 inline float getLon(){ return lon; };
69 int setElev( float relev );
70 float getElev();
71 int getSeconds();
72
73 int setDate( Date &rdate );
74 int getDate( Date &rdate );
75 Date getDate();
76 int setModel( int val );
77 int getModel();
78 int setNum( int val );
79 int getNum();
80 int setHour( int ind, int val );
81 int getHour( int ind );
82 int getInd( float hr );
83 int setT( int ind, int val );
84 int getT( int ind );
85 int setTd( int ind, int val );
86 int getTd( int ind );
87 int setCover( int ind, char val );
88 char getCover( int ind );
89 int setCeiling( int ind, int val );
90 int getCeiling( int ind );
91 int setVis( int ind, int val );
92 int getVis( int ind );
93 int setObvis( int ind, const char *val );
94 int getObvis( int ind, String &str );
95 int setTMax( int ind, int val );
96 int getTMax( int ind );
97 int setTMin( int ind, int val );
98 int getTMin( int ind );
99 int setWDir( int ind, int val );
100 int getWDir( int ind );
101 int setWSpd( int ind, int val );
102 int getWSpd( int ind );
103 int setPop6( int ind, int val );
104 int getPop6( int ind );
105 int setPop12( int ind, int val );
106 int getPop12( int ind );
107 int setPop24( int ind, int val );
108 int getPop24( int ind );
109 int setPot6( int ind, int val );
110 int getPot6( int ind );
111 int setPot12( int ind, int val );
112 int getPot12( int ind );
113 int setPot24( int ind, int val );
114 int getPot24( int ind );
115 int setPost6( int ind, int val );
116 int getPost6( int ind );
117 int setPost12( int ind, int val );
118 int getPost12( int ind );
119 int setPType( int ind, char val );
120 char getPType( int ind );
121 int setQpf6( int ind, int val );
122 int getQpf6( int ind );
123 int setQpf12( int ind, int val );
124 int getQpf12( int ind );
125 int setQsf6( int ind, int val );
126 int getQsf6( int ind );
127 int setQsf12( int ind, int val );
128 int getQsf12( int ind );
129 float cldHght( int ind );
130 float visibility( int ind );
131 float quantPrec6( int ind );
132 float quantPrec12( int ind );
133 float quantPrec24( int ind );
134 float snow6( int ind );
135 float snow12( int ind );
136 float snow24( int ind );
137 int weather6( int ind, String &wx6 );
138 int weather12( int ind, String &wx12 );
139
141 inline int getNMax(){ return nmax; };
143 inline int getNMin(){ return nmin; };
145 inline int getNPop(){ return npop; };
146
147 int print();
148 int printTable();
149
150 friend class MosFile;
151 friend class MosDataTool;
152 };
153}
154#endif
This class stores date and time information.
Definition Date.h:8
This class processes data from MosData class.
Definition MosDataTool.h:9
This class stores MOS data.
Definition MosData.h:9
int getNum()
Definition MosData.cc:217
char getCover(int ind)
Definition MosData.cc:315
int setWDir(int ind, int val)
Definition MosData.cc:431
int setDate(Date &rdate)
Definition MosData.cc:80
int setT(int ind, int val)
Definition MosData.cc:262
int getPop12(int ind)
Definition MosData.cc:505
float quantPrec6(int ind)
Definition MosData.cc:844
float getElev()
Definition MosData.cc:192
int getInd(float hr)
Definition MosData.cc:247
float getLat()
Definition MosData.h:66
int getT(int ind)
Definition MosData.cc:273
int getTMin(int ind)
Definition MosData.cc:421
int printTable()
Definition MosData.cc:1853
int setPop6(int ind, int val)
Definition MosData.cc:473
int getPost12(int ind)
Definition MosData.cc:631
int setWSpd(int ind, int val)
Definition MosData.cc:452
int setElev(float relev)
Definition MosData.cc:183
int getVis(int ind)
Definition MosData.cc:357
int setTd(int ind, int val)
Definition MosData.cc:283
int init()
Definition MosData.cc:30
int getNPop()
Definition MosData.h:145
int setObvis(int ind, const char *val)
Definition MosData.cc:367
int getQpf6(int ind)
Definition MosData.cc:673
int getCeiling(int ind)
Definition MosData.cc:336
int getPot6(int ind)
Definition MosData.cc:547
float snow12(int ind)
Definition MosData.cc:954
EarthPoint getLoc()
Definition MosData.cc:173
char getPType(int ind)
Definition MosData.cc:652
int setPot6(int ind, int val)
Definition MosData.cc:536
int setNum(int val)
Definition MosData.cc:208
int setQsf12(int ind, int val)
Definition MosData.cc:725
int setPost6(int ind, int val)
Definition MosData.cc:599
int setQpf6(int ind, int val)
Definition MosData.cc:662
int getPop24(int ind)
Definition MosData.cc:526
int getObvis(int ind, String &str)
Definition MosData.cc:378
MosData()
Definition MosData.cc:23
int setModel(int val)
Definition MosData.cc:106
int setQpf12(int ind, int val)
Definition MosData.cc:683
int getHour(int ind)
Definition MosData.cc:237
int setCover(int ind, char val)
Definition MosData.cc:304
int setPot12(int ind, int val)
Definition MosData.cc:557
int getPot12(int ind)
Definition MosData.cc:568
int getNMax()
Definition MosData.h:141
int getWDir(int ind)
Definition MosData.cc:442
int setId(const char *rid)
Definition MosData.cc:123
int weather6(int ind, String &wx6)
Definition MosData.cc:972
int getPost6(int ind)
Definition MosData.cc:610
int getQpf12(int ind)
Definition MosData.cc:694
int print()
Definition MosData.cc:1517
float visibility(int ind)
Definition MosData.cc:799
const char * getId()
Definition MosData.cc:145
float snow6(int ind)
Definition MosData.cc:945
int getPot24(int ind)
Definition MosData.cc:589
int setCeiling(int ind, int val)
Definition MosData.cc:325
int getQsf6(int ind)
Definition MosData.cc:715
int setPop24(int ind, int val)
Definition MosData.cc:515
float snow24(int ind)
Definition MosData.cc:963
int setPType(int ind, char val)
Definition MosData.cc:641
int getNMin()
Definition MosData.h:143
int getTMax(int ind)
Definition MosData.cc:400
int weather12(int ind, String &wx12)
Definition MosData.cc:1247
int getQsf12(int ind)
Definition MosData.cc:736
int setTMin(int ind, int val)
Definition MosData.cc:410
int setHour(int ind, int val)
Definition MosData.cc:226
int getPop6(int ind)
Definition MosData.cc:484
int setQsf6(int ind, int val)
Definition MosData.cc:704
int getModel()
Definition MosData.cc:115
Date getDate()
Definition MosData.cc:98
float cldHght(int ind)
Definition MosData.cc:746
int getWSpd(int ind)
Definition MosData.cc:463
float getLon()
Definition MosData.h:68
int setVis(int ind, int val)
Definition MosData.cc:346
float quantPrec12(int ind)
Definition MosData.cc:883
int setPop12(int ind, int val)
Definition MosData.cc:494
int setTMax(int ind, int val)
Definition MosData.cc:389
int setPot24(int ind, int val)
Definition MosData.cc:578
int setPost12(int ind, int val)
Definition MosData.cc:620
static const int NumData
Definition MosData.h:11
float quantPrec24(int ind)
Definition MosData.cc:922
int getTd(int ind)
Definition MosData.cc:294
int getSeconds()
Definition MosData.cc:200
This class reads MOS data files.
Definition MosFile.h:10
This is a variable length string class.
Definition String.h:5
All WXP classes fall under the WXP namespace.
Definition Angle.h:4
This struct defines earth point values (lat, lon, elev)
Definition EarthPoint.h:5