OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
afrt.h
Go to the documentation of this file.
1 /*
2  * afrt.h
3  *
4  * Created on: Mar 22, 2019
5  * Author: Samuel Anderson
6  */
7 
8 #ifndef SRC_AFRT_AFRT_H_
9 #define SRC_AFRT_AFRT_H_
10 
11 #include <vector>
12 #include <AfrtProcess.h>
13 
14 class Afrt
15 {
16 public:
18 
19  // output file attributes
20 
21  string title_ ;
22  string prod_name_ ;
23 
27  Afrt();
28 
32  virtual ~Afrt();
33 
37  virtual int initialize();
38 
42  int ocn();
43  int rt1();
44  int rt2(int ilm, int isd, int itau, int iwnd,
45  rt2_in* rt2in, rt2_out* rt2out,
46  rt1_in* rt1in, rt1_out* rt1out,
47  ocn_in* ocnin, ocn_out* ocnout,
48  phs_in* phsin, phs_out* phsout);
49 
50  int hump(double cnst, double t[][ntf], double tp[][nlyr],
51  int nm, double lp, double rmu[], double thd[], int ixy);
52  int anglw();
53  int frs(double xx, double xr, double xi, double& rfsea);
54  int matrx(int ii, int kk);
55  int mats(int ii, int kk, int l);
56  int depol(int ii, int kk, int l);
57  int single_down();
58  int single_up();
59  int getrad();
60  int multp1d();
61  int multp2d();
62  int geocor();
63  int geom(double a, double b, double c, double& r, double& g);
64  int rsea_new();
65  int fluxlvl(double buft[][2*nsza][nstk], double& sumg, int iflag);
66  int xntpln(double x,double x1,double x2,double y1,double y2,double &y);
67  int mdiffn(int ib, int ie, int il, double dlyr);
68 
72  string history_;
73 
75  history_ = history;
76  }
78  return history_;
79  }
80 
81 protected:
82  struct fdat {
83  double f[nphi][2*nsza][nstk];
84  };
85  std::vector<fdat> unit53;
86  std::vector<fdat> unit54;
87  std::vector<fdat> unit55;
88  std::vector<fdat> unit64;
89  std::vector<fdat> unit65;
90  std::vector<fdat> unit71;
91  std::vector<fdat> unit72;
92 
93  std::vector<fdat>* irad;
94  std::vector<fdat>* iwrt;
95 
109 
110  double ee[nstk];
111  double ei[nstk];
112  double eo[nstk];
113  double p[2*nphi][32];
114  double pp[nstk][nlyr];
115  double qq[nstk][nlyr];
116  double rmu[2*nthe];
117  double cmu[2*nthe];
118  double dcmu[2*nthe];
119  double dcmu2[2*nthe];
120  double cosmu[2*nthe];
121  double sinmu[2*nthe];
122  double the[2*nsza];
123  double c[2*nsza];
124  double phi[2*nphi];
125  double costh[2*nphi];
126  double sinth[2*nphi];
127  double taupl[nlyr];
128  double totl[nlyr];
129  double efact[nlyr];
130  double efactb[nlyr];
131  double emdtm[2*nsza][nlyr];
132  double emtm[2*nsza][nlyr];
133  double t[nstk][ntf];
134  double thd[ntf];
135  double pfs[2*nsza][2*nphi][32];
136  double ppin[2*nsza][2*nsza][2*nphi][32];
137  double atnflx[nsza][nlyr];
138  double qsp[nsza];
139  double fdown[nsza];
140  double fup[nsza];
141  double fdirc[nsza];
142  double oalb[nsza];
143  double sbarz[nsza];
144  double albtdr[nsza];
145  double albtdf[nsza];
146  double albtrf[nsza];
147  double albtdt[nsza];
148  double albwl[nsza];
149  double albrdr[nsza];
150  double albrdf[nsza];
151  double rfair[2*nsza];
152  double rfwat[2*nsza];
153  double txx[nsza][nthe][nphi][16];
154  double raddir[nphi][nthe][nsza];
155  double radocn[nphi][nthe][nsza];
156  double radsky[nphi][nthe][nsza];
157  double geoiup[nphi][nsza][20];
158  double geoidn[nphi][nsza][20];
159  double fluxu[nlyr][20];
160  double fluxd[nlyr][20];
161  double xzeroz[nphi][nthe][nsza][nstk];
162  double xzerod[nphi][nthe][nsza][nstk];
163  double xzero_up[nphi][nthe][nsza];
164  double xzero_btm[nphi][nthe][nsza];
165  double tupz[nphi][nthe][nsza][nstk];
166  double tdwnz[nphi][nthe][nsza][nstk];
167  double dtmm[nlyr];
168  double dtrr[nlyr];
169  double dtaa[nlyr];
170  double dtot[nlyr];
171  double tmsl;
172  double trsl;
173  double dlyr;
174  double factr;
175  double calb;
176  double amuo;
177  double nx;
178  double dphi;
179  double qsqt;
180  double wvlth;
181  double ddphi;
182  double cnst;
183  double conr;
184  double xrw;
185  double xiw;
186  double vz;
187  double alw;
188  double amusq;
189  double amumu;
190  double amups;
191  double copsi;
192  double copsq;
193  double cfisq;
194  double copcs;
195  double sfisq;
196  double rho;
197  double tautot;
198  int msza[nsza];
199  int ifc;
200  int iref;
201  int iglint;
202  int itrans;
203  int iwatr;
204  int ifoam;
205  int ipol;
206  int nolyr;
207  int nmu;
208  int nophi;
209  int jpart;
210  int jpass;
211  int kzz;
212  int ksza;
213  int kkx;
214  int kdx;
215  int insz;
216 
217 };
218 
219 
220 
221 
222 
223 #endif /* SRC_AFRT_AFRT_H_ */
fdat ftmp
Definition: afrt.h:100
double rmu[2 *nthe]
Definition: afrt.h:116
int hump(double cnst, double t[][ntf], double tp[][nlyr], int nm, double lp, double rmu[], double thd[], int ixy)
Definition: afrt.cpp:446
double xzeroz[nphi][nthe][nsza][nstk]
Definition: afrt.h:161
double nx
Definition: afrt.h:177
int r
Definition: decode_rs.h:73
int iglint
Definition: afrt.h:201
double pfs[2 *nsza][2 *nphi][32]
Definition: afrt.h:135
int mdiffn(int ib, int ie, int il, double dlyr)
Definition: afrt.cpp:1754
double fluxu[nlyr][20]
Definition: afrt.h:159
virtual int initialize()
Definition: afrt.cpp:41
fdat fnull
Definition: afrt.h:96
double dtaa[nlyr]
Definition: afrt.h:169
int16 iflag[18338]
double oalb[nsza]
Definition: afrt.h:142
double dphi
Definition: afrt.h:178
fdat fio
Definition: afrt.h:97
fdat fioup_btm
Definition: afrt.h:106
double radsky[nphi][nthe][nsza]
Definition: afrt.h:156
double ei[nstk]
Definition: afrt.h:111
double dtrr[nlyr]
Definition: afrt.h:168
double t[nstk][ntf]
Definition: afrt.h:133
fdat fiodn
Definition: afrt.h:107
double emdtm[2 *nsza][nlyr]
Definition: afrt.h:131
double albrdf[nsza]
Definition: afrt.h:150
int geom(double a, double b, double c, double &r, double &g)
Definition: afrt.cpp:1718
Afrt()
Definition: afrt.cpp:19
double albtdr[nsza]
Definition: afrt.h:144
std::vector< fdat > unit65
Definition: afrt.h:89
int single_down()
Definition: afrt.cpp:790
double xrw
Definition: afrt.h:184
int matrx(int ii, int kk)
Definition: afrt.cpp:622
double copcs
Definition: afrt.h:194
double pp[nstk][nlyr]
Definition: afrt.h:114
std::vector< fdat > unit53
Definition: afrt.h:85
double sinmu[2 *nthe]
Definition: afrt.h:121
double conr
Definition: afrt.h:183
int nolyr
Definition: afrt.h:206
double cfisq
Definition: afrt.h:193
double tdwnz[nphi][nthe][nsza][nstk]
Definition: afrt.h:166
int kkx
Definition: afrt.h:213
std::string getHistory()
Definition: afrt.h:77
double copsq
Definition: afrt.h:192
double albtrf[nsza]
Definition: afrt.h:146
fdat fglint
Definition: afrt.h:108
double taupl[nlyr]
Definition: afrt.h:127
double cnst
Definition: afrt.h:182
double geoiup[nphi][nsza][20]
Definition: afrt.h:157
int getrad()
Definition: afrt.cpp:990
string title_
Definition: afrt.h:21
@ string
int jpass
Definition: afrt.h:210
float tp[MODELMAX]
Definition: atrem_corl1.h:173
double sinth[2 *nphi]
Definition: afrt.h:126
double raddir[nphi][nthe][nsza]
Definition: afrt.h:154
int jpart
Definition: afrt.h:209
double qsqt
Definition: afrt.h:179
double totl[nlyr]
Definition: afrt.h:128
int kdx
Definition: afrt.h:214
int ksza
Definition: afrt.h:212
std::vector< fdat > unit64
Definition: afrt.h:88
double phi[2 *nphi]
Definition: afrt.h:124
double the[2 *nsza]
Definition: afrt.h:122
int kzz
Definition: afrt.h:211
fdat fiic
Definition: afrt.h:99
double txx[nsza][nthe][nphi][16]
Definition: afrt.h:153
std::vector< fdat > unit55
Definition: afrt.h:87
double amups
Definition: afrt.h:190
int geocor()
Definition: afrt.cpp:1316
fdat ftmpa
Definition: afrt.h:101
double dtot[nlyr]
Definition: afrt.h:170
int itrans
Definition: afrt.h:202
double amuo
Definition: afrt.h:176
virtual ~Afrt()
Definition: afrt.cpp:30
double geoidn[nphi][nsza][20]
Definition: afrt.h:158
void setHistory(std::string history)
Definition: afrt.h:74
int ifc
Definition: afrt.h:199
int rsea_new()
Definition: afrt.cpp:1481
double alw
Definition: afrt.h:187
double wvlth
Definition: afrt.h:180
fdat ftmpb
Definition: afrt.h:102
double albtdt[nsza]
Definition: afrt.h:147
double amusq
Definition: afrt.h:188
double copsi
Definition: afrt.h:191
double albwl[nsza]
Definition: afrt.h:148
string history_
Definition: afrt.h:72
int ifoam
Definition: afrt.h:204
int fluxlvl(double buft[][2 *nsza][nstk], double &sumg, int iflag)
Definition: afrt.cpp:1687
double fluxd[nlyr][20]
Definition: afrt.h:160
double amumu
Definition: afrt.h:189
int nmu
Definition: afrt.h:207
int mats(int ii, int kk, int l)
Definition: afrt.cpp:695
double xzerod[nphi][nthe][nsza][nstk]
Definition: afrt.h:162
double factr
Definition: afrt.h:174
std::vector< fdat > unit71
Definition: afrt.h:90
string prod_name_
Definition: afrt.h:22
string history
Definition: ncattredit.py:30
int anglw()
Definition: afrt.cpp:558
int frs(double xx, double xr, double xi, double &rfsea)
Definition: afrt.cpp:584
double dlyr
Definition: afrt.h:173
double vz
Definition: afrt.h:186
double xiw
Definition: afrt.h:185
double rfwat[2 *nsza]
Definition: afrt.h:152
double sbarz[nsza]
Definition: afrt.h:143
std::vector< fdat > * irad
Definition: afrt.h:93
std::vector< fdat > unit54
Definition: afrt.h:86
double dcmu2[2 *nthe]
Definition: afrt.h:119
double tmsl
Definition: afrt.h:171
double c[2 *nsza]
Definition: afrt.h:123
data_t b[NROOTS+1]
Definition: decode_rs.h:77
int ipol
Definition: afrt.h:205
double cosmu[2 *nthe]
Definition: afrt.h:120
double tupz[nphi][nthe][nsza][nstk]
Definition: afrt.h:165
int insz
Definition: afrt.h:215
double fdown[nsza]
Definition: afrt.h:139
std::vector< fdat > unit72
Definition: afrt.h:91
double dcmu[2 *nthe]
Definition: afrt.h:118
fdat fioup
Definition: afrt.h:105
double tautot
Definition: afrt.h:197
double albtdf[nsza]
Definition: afrt.h:145
double rfair[2 *nsza]
Definition: afrt.h:151
int rt2(int ilm, int isd, int itau, int iwnd, rt2_in *rt2in, rt2_out *rt2out, rt1_in *rt1in, rt1_out *rt1out, ocn_in *ocnin, ocn_out *ocnout, phs_in *phsin, phs_out *phsout)
Definition: afrt.cpp:79
double calb
Definition: afrt.h:175
int iwatr
Definition: afrt.h:203
double ee[nstk]
Definition: afrt.h:110
double f[nphi][2 *nsza][nstk]
Definition: afrt.h:83
double qq[nstk][nlyr]
Definition: afrt.h:115
double ddphi
Definition: afrt.h:181
int depol(int ii, int kk, int l)
Definition: afrt.cpp:746
double efact[nlyr]
Definition: afrt.h:129
int single_up()
Definition: afrt.cpp:911
double dtmm[nlyr]
Definition: afrt.h:167
double cmu[2 *nthe]
Definition: afrt.h:117
Definition: afrt.h:14
double p[2 *nphi][32]
Definition: afrt.h:113
double ppin[2 *nsza][2 *nsza][2 *nphi][32]
Definition: afrt.h:136
double fup[nsza]
Definition: afrt.h:140
fdat snglb
Definition: afrt.h:104
std::vector< fdat > * iwrt
Definition: afrt.h:94
int ocn()
Definition: afrt.cpp:53
int multp1d()
Definition: afrt.cpp:1054
double atnflx[nsza][nlyr]
Definition: afrt.h:137
double costh[2 *nphi]
Definition: afrt.h:125
int nophi
Definition: afrt.h:208
double qsp[nsza]
Definition: afrt.h:138
string output_filepath_
Definition: afrt.h:17
int multp2d()
Definition: afrt.cpp:1200
double xzero_btm[nphi][nthe][nsza]
Definition: afrt.h:164
double sfisq
Definition: afrt.h:195
int xntpln(double x, double x1, double x2, double y1, double y2, double &y)
Definition: afrt.cpp:1740
fdat sngla
Definition: afrt.h:103
int iref
Definition: afrt.h:200
fdat fiib
Definition: afrt.h:98
double eo[nstk]
Definition: afrt.h:112
double radocn[nphi][nthe][nsza]
Definition: afrt.h:155
double rho
Definition: afrt.h:196
PGE01 indicating that PGE02 PGE01 V6 for and PGE01 V2 for MOD03 were used to produce the granule By convention adopted in all MODIS Terra PGE02 code versions are The fourth digit of the PGE02 version denotes the LUT version used to produce the granule The source of the metadata environment variable ProcessingCenter was changed from a QA LUT value to the Process Configuration A sign used in error in the second order term was changed to a
Definition: HISTORY.txt:424
double thd[ntf]
Definition: afrt.h:134
double trsl
Definition: afrt.h:172
double fdirc[nsza]
Definition: afrt.h:141
double albrdr[nsza]
Definition: afrt.h:149
double xzero_up[nphi][nthe][nsza]
Definition: afrt.h:163
int msza[nsza]
Definition: afrt.h:198
double emtm[2 *nsza][nlyr]
Definition: afrt.h:132
int rt1()
Definition: afrt.cpp:66
double efactb[nlyr]
Definition: afrt.h:130