WXP C++ Library Version 6.74.9
Loading...
Searching...
No Matches
GridSpec.h
1#ifndef _WINC_GRIDSPEC
2#define _WINC_GRIDSPEC
3
4#include <WXP/Const.h>
5
6namespace WXP {
7 class GridSpec {
8 int num; /* Specific grid number */
9 int model; /* Model used to produce grid */
10 int type; /* Grid type used in grid */
11 int time; /* Time of grid */
12 int ltype; /* Type of vertical level */
13 int level; /* Level of grid */
14 int var[5]; /* Variable */
15 char units[20]; /* Variable units */
16
17 public:
18 GridSpec();
19 GridSpec( const char *str );
20 int init();
21 int set( int rmod, int rtype, int t, int lt, int l, int v );
22 int set( const char *str );
23 int decode( const char *str );
24 inline int setNum( int val ){ num = val; return 1; };
25 inline int getNum(){ return num; };
26 inline int setModel( int val ){ model = val; return 1; };
27 inline int getModel(){ return model; };
28 inline int setType( int val ){ type = val; return 1; };
29 inline int getType(){ return type; };
30 inline int setTime( int val ){ time = val; return 1; };
31 inline int getTime(){ return time; };
32 inline int getTimeType(){ return (time/1000000)%10; };
33 inline int getTimeOffset(){ return (time/10000000)%100; };
34 inline int getTime1(){ return time%1000; };
35 inline int getTime2(){ return (time/1000)%1000; };
36 inline int setLevelType( int val ){ ltype = val; return 1; };
37 inline int getLevelType(){ return ltype; };
38 inline int setLevel( int val ){ level = val; return 1; };
39 inline int getLevel(){ return level; };
40 inline int setVar( int val ){ var[0] = val; return 1; };
41 int setVar( int i, int val );
42 inline int getVar(){ return var[0]; };
43 bool isSet();
44 bool isVarSet();
45 int setUnits( const char *str );
46 inline const char *getUnits(){ return units; };
47 int print();
48
49 static bool equal( GridSpec gs1, GridSpec gs2 );
50 };
51}
52#endif
This class defines vertical level parameters.
Definition GridSpec.h:7
int init()
Definition GridSpec.cc:41
GridSpec()
Definition GridSpec.cc:26
int set(int rmod, int rtype, int t, int lt, int l, int v)
Definition GridSpec.cc:66
All WXP classes fall under the WXP namespace.
Definition Angle.h:4