Go to the documentation of this file.
6 const static double degra =
M_PI / 180.e0;
7 #define DSIGN(A, B) (B >= 0 ? fabs(A) : -fabs(A))
52 void reflec_both(
double inc_angle,
double *Effective_Refl,
double *BiRefl) {
53 const double ref = 4.0e0 / 3.0e0;
54 double refract_angle, Rs, Rp;
55 if (inc_angle < 0.00001) {
56 *Effective_Refl = .0204078;
59 refract_angle = asin(sin(inc_angle) /
ref);
60 Rs = (sin(inc_angle - refract_angle) / sin(inc_angle + refract_angle));
62 Rp = (tan(inc_angle - refract_angle) / tan(inc_angle + refract_angle));
64 *Effective_Refl = Rs + Rp;
65 *Effective_Refl = *Effective_Refl / 2.;
67 *BiRefl = *BiRefl / 2.;
71 void reflec_(
float *inc_angle,
float *Effective_Refl) {
72 double BiRefl, effective_Refl, inc_angle_;
73 inc_angle_ = (
double)(*inc_angle);
75 *Effective_Refl = (
float)effective_Refl;
79 float *glint_coef_q,
float *glint_coef_u) {
80 const double deg_cuttof = 1e-7;
82 const double ws_gl = .04964e0;
83 float ws_ = fmax(ws, 0.001
f);
84 double senz_ =
senz * degra;
85 double solz_ =
solz * degra;
86 double raz_ = raz * degra;
93 double argument = cos(senz_) * cos(solz_) -
94 sin(senz_) * sin(solz_) *
100 argument = (cos(senz_) + cos(solz_)) / (2.0e0 * cos(
omega));
104 double sigc = ws_gl * sqrt(ws_);
105 double expon = -tan(
beta) * tan(
beta) / 2. / sigc / sigc;
110 double prob = exp(expon) / (2. *
M_PI * sigc * sigc);
111 double BiRefl, effective_refl;
113 double cs_beta2 = cos(
beta) * cos(
beta);
114 double cs_beta4 = cs_beta2 * cs_beta2;
115 *glint_coef = effective_refl * prob / (4.0e0 * cos(senz_) * cs_beta4);
117 if (
omega > 0.0001) {
118 double CR = (cos(solz_) - cos(2. *
omega) * cos(senz_)) / (sin(2. *
omega) * sin(solz_));
119 double SR = sin(solz_) * sin(
M_PI - raz_) / sin(2. *
omega);
124 double c2r = cos(2. * rot_ang);
125 double s2r = sin(2. * rot_ang);
126 *glint_coef_q = c2r * BiRefl / effective_refl;
127 *glint_coef_u = -s2r * BiRefl / effective_refl;
130 void getglint_(
float *
senz,
float *
solz,
float *raz,
float *ws,
float *chi,
float *glint_coef) {
131 float glint_coef_q, glint_coef_u;
136 float *glint_coef_q,
float *glint_coef_u) {
void getglint_(float *senz, float *solz, float *raz, float *ws, float *chi, float *glint_coef)
double precision function f(R1)
void reflec_(float *inc_angle, float *Effective_Refl)
integer, parameter double
void reflec_both(double inc_angle, double *Effective_Refl, double *BiRefl)
C inc_angle Incident angle (radians) C Rs Reflectivity s polarized C Rp Reflectivity p polarized C C ...
void getglint_iqu_(float *senz, float *solz, float *raz, float *ws, float *chi, float *glint_coef, float *glint_coef_q, float *glint_coef_u)
void getglint_iqu(float senz, float solz, float raz, float ws, float chi, float *glint_coef, float *glint_coef_q, float *glint_coef_u)
Get the glint iqu object.