45 '$Id: Azimuth_Emissivity_Module.f90 60152 2015-08-13 19:19:13Z paul.vandelst@noaa.gov $' 47 REAL(fp),
PARAMETER ::
zero = 0.0_fp
48 REAL(fp),
PARAMETER ::
one = 1.0_fp
49 REAL(fp),
PARAMETER ::
two = 2.0_fp
50 REAL(fp),
PARAMETER ::
three = 3.0_fp
51 REAL(fp),
PARAMETER ::
pi = 3.141592653589793238462643383279_fp
70 REAL(fp) :: wind_speed =
zero 71 REAL(fp) :: frequency =
zero 92 Wind_Speed , & ! Input
93 Azimuth_Angle, & ! Input
96 e_Azimuth , & ! Output
100 REAL(fp) ,
INTENT(IN) :: wind_speed
101 REAL(fp) ,
INTENT(IN) :: azimuth_angle
102 REAL(fp) ,
INTENT(IN) :: frequency
103 REAL(fp) ,
INTENT(IN) :: cos_z
104 REAL(fp) ,
INTENT(OUT) :: e_azimuth(:)
108 REAL(fp) :: phi, angle
115 ivar%wind_speed = wind_speed
116 ivar%frequency = frequency
117 ivar%sec_z =
one/cos_z
129 angle =
REAL(m,fp) * phi
130 ivar%cos_angle(m) = cos(angle)
131 ivar%sin_angle(m) = sin(angle)
138 ivar%trig_coeff(i,m) )
142 e_azimuth(1) = e_azimuth(1) + ivar%trig_coeff(1,m)*ivar%cos_angle(m)
143 e_azimuth(2) = e_azimuth(2) + ivar%trig_coeff(2,m)*ivar%cos_angle(m)
144 e_azimuth(3) = e_azimuth(3) + ivar%trig_coeff(3,m)*ivar%sin_angle(m)
145 e_azimuth(4) = e_azimuth(4) + ivar%trig_coeff(4,m)*ivar%sin_angle(m)
158 Wind_Speed_TL , & ! Input
159 Azimuth_Angle_TL, & ! Input
160 e_Azimuth_TL , & ! Output
164 REAL(fp) ,
INTENT(IN) :: wind_speed_tl
165 REAL(fp) ,
INTENT(IN) :: azimuth_angle_tl
166 REAL(fp) ,
INTENT(OUT) :: e_azimuth_tl(:)
170 REAL(fp) :: phi_tl, angle_tl
181 CALL compute_predictors_tl( ivar%wind_speed, ivar%frequency, ivar%sec_z, wind_speed_tl, predictor_tl )
187 angle_tl =
REAL(m,fp) * phi_tl
199 e_azimuth_tl(1) = e_azimuth_tl(1) + ivar%cos_angle(m)*trig_coeff_tl(1) - &
200 ivar%trig_coeff(1,m)*ivar%sin_angle(m)*angle_tl
202 e_azimuth_tl(2) = e_azimuth_tl(2) + ivar%cos_angle(m)*trig_coeff_tl(2) - &
203 ivar%trig_coeff(2,m)*ivar%sin_angle(m)*angle_tl
205 e_azimuth_tl(3) = e_azimuth_tl(3) + ivar%sin_angle(m)*trig_coeff_tl(3) + &
206 ivar%trig_coeff(3,m)*ivar%cos_angle(m)*angle_tl
208 e_azimuth_tl(4) = e_azimuth_tl(4) + ivar%sin_angle(m)*trig_coeff_tl(4) + &
209 ivar%trig_coeff(4,m)*ivar%cos_angle(m)*angle_tl
221 e_Azimuth_AD , & ! AD Input
222 Wind_Speed_AD , & ! AD Output
223 Azimuth_Angle_AD, & ! AD Output
227 REAL(fp) ,
INTENT(IN OUT) :: e_azimuth_ad(:)
228 REAL(fp) ,
INTENT(IN OUT) :: wind_speed_ad
229 REAL(fp) ,
INTENT(IN OUT) :: azimuth_angle_ad
233 REAL(fp) :: phi_ad, angle_ad
249 angle_ad = ivar%trig_coeff(4,m)*ivar%cos_angle(m)*e_azimuth_ad(4)
250 trig_coeff_ad(4) = ivar%sin_angle(m)*e_azimuth_ad(4)
252 angle_ad = angle_ad + ivar%trig_coeff(3,m)*ivar%cos_angle(m)*e_azimuth_ad(3)
253 trig_coeff_ad(3) = ivar%sin_angle(m)*e_azimuth_ad(3)
255 angle_ad = angle_ad - ivar%trig_coeff(2,m)*ivar%sin_angle(m)*e_azimuth_ad(2)
256 trig_coeff_ad(2) = ivar%cos_angle(m)*e_azimuth_ad(2)
258 angle_ad = angle_ad - ivar%trig_coeff(1,m)*ivar%sin_angle(m)*e_azimuth_ad(1)
259 trig_coeff_ad(1) = ivar%cos_angle(m)*e_azimuth_ad(1)
270 phi_ad = phi_ad +
REAL(m,
fp)*angle_ad
275 CALL compute_predictors_ad( ivar%wind_speed, ivar%frequency, ivar%sec_z, predictor_ad, wind_speed_ad )
297 Wind_Speed, & ! Input
298 Frequency , & ! Input
302 REAL(fp),
INTENT(IN) :: Wind_Speed
303 REAL(fp),
INTENT(IN) :: Frequency
304 REAL(fp),
INTENT(IN) :: sec_z
305 REAL(fp),
INTENT(OUT) :: Predictor(N_PREDICTORS)
308 predictor( 2) = frequency
309 predictor( 3) = sec_z
310 predictor( 4) = sec_z * frequency
311 predictor( 5) = wind_speed
312 predictor( 6) = wind_speed * frequency
313 predictor( 7) = wind_speed**2
314 predictor( 8) = frequency * wind_speed**2
315 predictor( 9) = wind_speed * sec_z
316 predictor(10) = wind_speed * sec_z * frequency
322 Wind_Speed , & ! FWD Input
323 Frequency , & ! FWD Input
324 sec_z , & ! FWD Input
325 Wind_Speed_TL, & ! TL Input
328 REAL(fp),
INTENT(IN) :: Wind_Speed
329 REAL(fp),
INTENT(IN) :: Frequency
330 REAL(fp),
INTENT(IN) :: sec_z
331 REAL(fp),
INTENT(IN) :: Wind_Speed_TL
332 REAL(fp),
INTENT(OUT) :: Predictor_TL(N_PREDICTORS)
334 predictor_tl( 1) =
zero 335 predictor_tl( 2) =
zero 336 predictor_tl( 3) =
zero 337 predictor_tl( 4) =
zero 338 predictor_tl( 5) = wind_speed_tl
339 predictor_tl( 6) = frequency * wind_speed_tl
340 predictor_tl( 7) =
two * wind_speed * wind_speed_tl
341 predictor_tl( 8) =
two * frequency * wind_speed * wind_speed_tl
342 predictor_tl( 9) = sec_z * wind_speed_tl
343 predictor_tl(10) = sec_z * frequency * wind_speed_tl
349 Wind_Speed , & ! FWD Input
350 Frequency , & ! FWD Input
351 sec_z , & ! FWD Input
352 Predictor_AD , & ! AD Input
355 REAL(fp),
INTENT(IN) :: Wind_Speed
356 REAL(fp),
INTENT(IN) :: Frequency
357 REAL(fp),
INTENT(IN) :: sec_z
358 REAL(fp),
INTENT(IN OUT) :: Predictor_AD(N_PREDICTORS)
359 REAL(fp),
INTENT(IN OUT) :: Wind_Speed_AD
361 wind_speed_ad = wind_speed_ad + &
362 sec_z * frequency * predictor_ad(10) + &
363 sec_z * predictor_ad( 9) + &
364 two * frequency * wind_speed * predictor_ad( 8) + &
365 two * wind_speed * predictor_ad( 7) + &
366 frequency * predictor_ad( 6) + &
382 REAL(fp),
INTENT(IN) :: c(:)
383 REAL(fp),
INTENT(IN) :: X(:)
384 REAL(fp),
INTENT(OUT) :: Coefficient
390 coefficient = coefficient + c(i)*x(i)
401 REAL(fp),
INTENT(IN) :: c(:)
402 REAL(fp),
INTENT(IN) :: X_TL(:)
403 REAL(fp),
INTENT(OUT) :: Coefficient_TL
407 coefficient_tl =
zero 409 coefficient_tl = coefficient_tl + c(i)*x_tl(i)
417 Coefficient_AD, & ! Input
420 REAL(fp),
INTENT(IN) :: c(:)
421 REAL(fp),
INTENT(IN OUT) :: Coefficient_AD
422 REAL(fp),
INTENT(IN OUT) :: X_AD(:)
427 x_ad(i) = x_ad(i) + c(i)*coefficient_ad
429 coefficient_ad =
zero 435 REAL( fp ),
INTENT(IN) :: frequency
439 REAL(fp),
PARAMETER :: x(9) = (/ 0.0_fp, 1.4_fp, 6.8_fp, 10.7_fp, 19.35_fp, &
440 37._fp, 89._fp, 150._fp, 200._fp/)
441 REAL(fp),
PARAMETER :: y(9) = (/ 0.0_fp, 0.1_fp, 0.6_fp, 0.9_fp, 1._fp, &
442 1.0_fp, 0.4_fp, 0.2_fp, 0.0_fp/)
444 IF( frequency <=
zero .or. frequency >= 200.0_fp )
THEN 449 IF( frequency >= x(i) .and. frequency <= x(i+1) )
THEN 450 fre_c = y(i) + (y(i+1)-y(i))/(x(i+1)-x(i))*(frequency-x(i))
subroutine, public azimuth_emissivity_tl(AZCoeff, Wind_Speed_TL, Azimuth_Angle_TL, e_Azimuth_TL, iVar)
integer, parameter n_stokes
integer, parameter, public fp
pure real(fp) function azimuth_freq_correction(Frequency)
subroutine, public azimuth_emissivity_ad(AZCoeff, e_Azimuth_AD, Wind_Speed_AD, Azimuth_Angle_AD, iVar)
subroutine compute_coefficient(c, X, Coefficient)
subroutine compute_coefficient_tl(c, X_TL, Coefficient_TL)
subroutine compute_predictors(Wind_Speed, Frequency, sec_z, Predictor)
subroutine compute_coefficient_ad(c, Coefficient_AD, X_AD)
subroutine, public azimuth_emissivity(AZCoeff, Wind_Speed, Azimuth_Angle, Frequency, cos_z, e_Azimuth, iVar)
real(fp), parameter degrees_to_radians
character(*), parameter module_version_id
real(fp), parameter three
subroutine compute_predictors_ad(Wind_Speed, Frequency, sec_z, Predictor_AD, Wind_Speed_AD)
subroutine compute_predictors_tl(Wind_Speed, Frequency, sec_z, Wind_Speed_TL, Predictor_TL)
integer, parameter n_predictors
integer, parameter n_harmonics