OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
DDAlgorithm.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * NAME: DDAlgorithm.h
4  *
5  * DESCRIPTION: Base class for all algorithms.
6  *
7  * Created on: October 19, 2020
8  * Author: Sam Anderson
9  *
10  *******************************************************************************/
11 
12 #ifndef DDAlgorithm_H_
13 #define DDAlgorithm_H_
14 
15 #include <boost/multi_array.hpp>
16 
17 #include <DDataset.hpp>
18 #include <DDProcess.h>
19 
20 using namespace std;
21 
22 enum class flags {
23  ATMFAIL= 1,
24  LAND= 2,
25  PRODWARN= 4,
26  HIGLINT= 8,
27  HILT= 16,
28  HISATZEN= 32,
29  COASTZ= 64,
30  SPARE= 128,
31  STRAYLIGHT= 256,
32  CLDICE= 512,
33  COCCOLITH= 1024,
34  TURBIDW= 2048,
35  HISOLZEN= 4096,
36  SPARE1= 8192,
37  LOWLW= 16384,
38  CHLFAIL= 32768,
39  NAVWARN= 65536,
40  ABSAER= 131072,
41  SPARE2= 262144,
42  MAXAERITER= 524288,
43  MODGLINT= 1048576,
44  CHLWARN= 2097152,
45  ATMWARN= 4194304,
46  SPARE3= 8388608,
47  SEAICE= 16777216,
48  NAVFAIL= 33554432,
49  FILTER= 67108864,
50  SPARE5= 134217728,
51  BOWTIEDEL= 268435456,
52  HIPOL= 536870912,
53  PRODFAIL= 1073741824
54 };
55 
61 {
62 public:
63 
64  DDAlgorithm();
65  virtual ~DDAlgorithm ();
66  virtual int initialize(map<string, ddata*> imap) {return 0;};
67  virtual map<string, ddata*> process(vector<size_t> start, vector<size_t> count,
68  map<string, ddata*> imap) {map<string, ddata*> map; return map;};
69  virtual vector<string> get_products() {vector<string> list; return list;};
70 
71 protected:
72 
73  size_t lines_;
74  size_t pixels_;
75  float rfl_[NTWL];
76  float rfla_[NTWL][3][3];
77  float gasc_[NTWL];
78  float lat_;
79  float lon_;
80  float solz_;
81  float senz_;
82  float raa_;
83  float height_;
84  float scatt_;
85  float ws_;
86  float pwv_;
87  float oz_;
88  float ps_;
89  int month_;
93  bool btest_;
94 
95  unsigned char cloud_mask_;
96  short qual_flag_;
98  short error_flag_;
99  unsigned int l2_flags_;
101  float glint_ang_;
102  float sse_;
103  float fmf_;
104  float aot_550_;
105  float ae1_;
106  float ae2_;
107  float ndv_;
108  float chlor_;
109  float ssa_[NLWL+1];
110  float sr_[NLWL+1];
111  float aot_[NOWL+1];
112 
113  int get_inputs( vector<size_t> start, vector<size_t> count,
114  map<string, ddata*> imap );
115 
116  map<string, ddata*> set_outputs();
117  map<string, ddata*> set_fills();
118 };
119 
120 
121 #endif /* DDAlgorithm_H_ */
float scatt_
Definition: DDAlgorithm.h:84
float raa_
Definition: DDAlgorithm.h:82
short aerosol_type_
Definition: DDAlgorithm.h:97
float lon_
Definition: DDAlgorithm.h:79
list(APPEND LIBS ${PGSTK_LIBRARIES}) add_executable(atteph_info_modis atteph_info_modis.c) target_link_libraries(atteph_info_modis $
Definition: CMakeLists.txt:7
short qual_flag_
Definition: DDAlgorithm.h:96
size_t pixels_
Definition: DDAlgorithm.h:74
short error_flag_
Definition: DDAlgorithm.h:98
@ BOWTIEDEL
float senz_
Definition: DDAlgorithm.h:81
@ PRODWARN
@ MAXAERITER
@ STRAYLIGHT
@ HISATZEN
unsigned char cloud_mask_
Definition: DDAlgorithm.h:95
bool bglintmask_
Definition: DDAlgorithm.h:91
virtual int initialize(map< string, ddata * > imap)
Definition: DDAlgorithm.h:66
float chlor_
Definition: DDAlgorithm.h:108
@ MODGLINT
float scatter_ang_
Definition: DDAlgorithm.h:100
float lat_
Definition: DDAlgorithm.h:78
float glint_ang_
Definition: DDAlgorithm.h:101
float aot_550_
Definition: DDAlgorithm.h:104
bool bgascorrect_
Definition: DDAlgorithm.h:90
@ HISOLZEN
bool bcloudmask_
Definition: DDAlgorithm.h:92
unsigned int l2_flags_
Definition: DDAlgorithm.h:99
flags
Definition: DDAlgorithm.h:22
float height_
Definition: DDAlgorithm.h:83
virtual map< string, ddata * > process(vector< size_t > start, vector< size_t > count, map< string, ddata * > imap)
Definition: DDAlgorithm.h:67
def set_outputs(output_keys)
Definition: utils.py:164
@ PRODFAIL
float solz_
Definition: DDAlgorithm.h:80
float pwv_
Definition: DDAlgorithm.h:86
@ COCCOLITH
int count
Definition: decode_rs.h:79