OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
atrem.h
Go to the documentation of this file.
1 /*
2  * atrem.h
3  *
4  * Created on: Feb 11, 2015
5  * Author: rhealy
6  */
7 
8 #ifndef SRC_ATREM_ATREM_H_
9 #define SRC_ATREM_ATREM_H_
10 #include <stdint.h>
11 #include <stdio.h>
12 #include <stdlib.h>
13 
14 #define NBANDS 1024 /* maximum number of pixels in a scan line */
15 #define TBLMAX 60
16 #define TBLMAXM1 (TBLMAX-1)
17 #define FINSTMAX 100
18 
19 typedef struct param_table {
20  /*Number of narrow channels to form broader window and absorption channels. */
21  int32_t nb1, nb2, nb3, nb4;
22  /*number of points used in channel ratios for both the .94- and 1.14-um regions */
23  int32_t nbp94, nb1p14;
24 
25  int32_t nh2o; /* number of water vapor values */
26  int32_t nobs; /* number of spectral observations - this should be nbands? number of channels? */
27  /* 3-channel ratioing
28  * parameters for bands up to the 0.94-um water vapor band [index=0,1]
29  * parameters for bands up to the 1.14-um water vapor band [index=2,3]
30  * */
31  int32_t start_ndx[4]; //ist1,ist2,ist3,ist4
32  int32_t end_ndx[4]; //ied1,ied2,ied3,ied4
33  /* 3-channel ratioing parameters for the 0.94-um water vapor band */
34  int32_t start_p94;
35  int32_t end_p94;
36  /* 3-channel ratioing parameters for the 1.14-um water vapor band */
37  int32_t start_1p14;
38  int32_t end_1p14;
39  /* Parameters for smoothing output reflectance spectra. */
40  int32_t start2;
41  int32_t end2;
42  int32_t ncv2;
43  /* number of channels of the four AVIRIS spectrometers. */
44  int32_t natot, nbtot, nctot, ndtot;
45  /* Relative weights for the four window *
46  * channels used in channel-ratioing calculations */
47  double wt1, wt2, wt3, wt4;
48  /*
49  * delta, delta2 - resolution, in units of nm, of input
50  * spectra and resolution of output surface reflectance
51  * spectra. If DLT2>DLT, output spectra are smoothed
52  * using a gaussian function.
53  */
54  double delta, delta2;
55  /* The "equivalent" geometrical *
56  * factor corresponding to the total slant vapor amount *
57  * VAP_SLANT_MDL and the column vapor amount CLMVAP. */
58  double g_vap_equiv; // This depends on zenith angle and lat/lon of measurement
59  double r0p94[TBLMAX]; //ratio for the 0.94 um H2O absorption band
60  double r1p14[TBLMAX]; //ratio for the 1.14 um H2O absorption band
61  double finst2[FINSTMAX]; // some kind of smoothing factor calculated in INIT_SPECCAL only used for AVIRIS?
62  /* TOTAL SUN-SURFACE-SENSOR PATH WATER VAPOR IN UNITS OF CM */
63  double vaptot[TBLMAX];
64  /* total transmittances of all gases that match the *
65  * resolutions of imaging spectrometers */
66  double trntbl[TBLMAX][NBANDS];
67 } paramstr;
68 
69 int get_atrem(double *yy, paramstr P, double *, double *, double *, double *, double *, double *, double *, double *, int32_t *, int32_t *);
70 int32_t hunt(double *xx, int32_t n, double x, int32_t jlo);
71 
72 #endif /* SRC_ATREM_ATREM_H_ */
int32_t end_p94
Definition: atrem.h:35
int32_t ndtot
Definition: atrem.h:44
double wt3
Definition: atrem.h:47
int32_t nb2
Definition: atrem.h:21
int32_t nctot
Definition: atrem.h:44
int32_t ncv2
Definition: atrem.h:42
int32_t end_1p14
Definition: atrem.h:38
int32_t nbtot
Definition: atrem.h:44
int32_t nbp94
Definition: atrem.h:23
double r1p14[TBLMAX]
Definition: atrem.h:60
int32_t hunt(double *xx, int32_t n, double x, int32_t jlo)
double r0p94[TBLMAX]
Definition: atrem.h:59
int32_t natot
Definition: atrem.h:44
double wt4
Definition: atrem.h:47
double g_vap_equiv
Definition: atrem.h:58
#define TBLMAX
Definition: atrem.h:15
int32_t nb4
Definition: atrem.h:21
int32_t start_ndx[4]
Definition: atrem.h:31
int get_atrem(double *yy, paramstr P, double *, double *, double *, double *, double *, double *, double *, double *, int32_t *, int32_t *)
double wt1
Definition: atrem.h:47
int32_t start_1p14
Definition: atrem.h:37
double wt2
Definition: atrem.h:47
double trntbl[TBLMAX][NBANDS]
Definition: atrem.h:66
double finst2[FINSTMAX]
Definition: atrem.h:61
int32_t nh2o
Definition: atrem.h:25
int32_t nobs
Definition: atrem.h:26
int32_t end_ndx[4]
Definition: atrem.h:32
int32_t end2
Definition: atrem.h:41
double vaptot[TBLMAX]
Definition: atrem.h:63
double delta
Definition: atrem.h:54
#define FINSTMAX
Definition: atrem.h:17
#define NBANDS
Definition: atrem.h:14
int32_t nb1
Definition: atrem.h:21
int32_t nb1p14
Definition: atrem.h:23
int32_t start2
Definition: atrem.h:40
int32_t nb3
Definition: atrem.h:21
int32_t start_p94
Definition: atrem.h:34
double delta2
Definition: atrem.h:54