59 REAL(fp),
PARAMETER ::
max_od = 20.0_fp
137 ChannelIndex , & ! Input
138 Predictor , & ! Input
142 INTEGER ,
INTENT(IN) :: channelindex
146 INTEGER :: n_layers, n_user_layers
151 REAL(fp) :: od(predictor%n_layers)
152 REAL(fp) :: od_path(0:predictor%n_layers)
153 REAL(fp) :: user_od_path(0:predictor%n_user_layers)
154 INTEGER :: odps2user_idx(2, 0:predictor%n_user_layers)
163 n_layers = predictor%n_Layers
164 n_user_layers = predictor%n_User_Layers
171 component_loop:
DO j = 1, predictor%n_Components
178 np = tc%n_Predictors(j, channelindex)
181 IF( np <= 0 ) cycle component_loop
186 IF( predictor%OPTRAN .AND. j == tc%OComponent_Index)
THEN 200 j0 = tc%Pos_Index(j, channelindex)
202 js = j0+(i-1)*n_layers-1
204 od(k) = od(k) + tc%C(js+k)*predictor%X(k, i, j)
210 END DO component_loop
220 ELSE IF(od(k) >
max_od)
THEN 223 od_path(k) = od_path(k-1) + od_tmp
229 IF ( pafv_associated(predictor%PAFV) )
THEN 231 predictor%PAFV%OD = od
232 predictor%PAFV%OD_Path = od_path
234 user_od_path(0) =
zero 237 predictor%Ref_Level_LnPressure, &
238 predictor%User_Level_LnPressure, &
243 predictor%User_Level_LnPressure,&
247 predictor%Ref_Level_LnPressure, &
248 predictor%User_Level_LnPressure, &
254 atmabsorption%Optical_Depth = (user_od_path(1:n_user_layers) - &
255 user_od_path(0:n_user_layers-1)) / &
256 predictor%Secant_Zenith_Surface
324 ChannelIndex , & ! Input
325 Predictor , & ! Input
326 Predictor_TL , & ! Input
330 INTEGER ,
INTENT(IN) :: channelindex
335 INTEGER :: n_layers, n_user_layers
340 REAL(fp) :: od_tl(predictor%n_layers)
341 REAL(fp) :: od_path_tl(0:predictor%n_layers)
342 REAL(fp) :: user_od_path_tl(0:predictor%n_user_layers)
350 n_layers = predictor%n_Layers
351 n_user_layers = predictor%n_User_Layers
358 component_loop:
DO j = 1, predictor%n_Components
365 np = tc%n_Predictors(j, channelindex)
368 IF( np <= 0 ) cycle component_loop
373 IF( predictor%OPTRAN .AND. j == tc%OComponent_Index)
THEN 388 j0 = tc%Pos_Index(j, channelindex)
390 js = j0+(i-1)*n_layers-1
392 od_tl(k) = od_tl(k) + tc%C(js+k)*predictor_tl%X(k, i, j)
398 END DO component_loop
405 IF(predictor%PAFV%OD(k) <
zero)
THEN 407 ELSE IF(predictor%PAFV%OD(k) >
max_od)
THEN 410 od_path_tl(k) = od_path_tl(k-1) + od_tl(k)
416 predictor%Ref_Level_LnPressure, &
417 predictor%User_Level_LnPressure, &
421 atmabsorption_tl%Optical_Depth = (user_od_path_tl(1:n_user_layers) - &
422 user_od_path_tl(0:n_user_layers-1)) / &
423 predictor%Secant_Zenith_Surface
491 ChannelIndex , & ! Input
492 Predictor , & ! Input
493 AtmAbsorption_AD, & ! Input
497 INTEGER ,
INTENT(IN) :: channelindex
502 INTEGER :: n_layers, n_user_layers
507 REAL(fp) :: od_ad(predictor%n_layers)
508 REAL(fp) :: od_path_ad(0:predictor%n_layers)
509 REAL(fp) :: user_od_path_ad(0:predictor%n_user_layers)
517 n_layers = predictor%n_Layers
518 n_user_layers = predictor%n_User_Layers
524 user_od_path_ad(n_user_layers) =
zero 525 DO k = n_user_layers, 1, -1
526 user_od_path_ad(k) = user_od_path_ad(k) &
527 + atmabsorption_ad%Optical_Depth(k)/predictor%Secant_Zenith_Surface
529 user_od_path_ad(k-1) = -atmabsorption_ad%Optical_Depth(k)/predictor%Secant_Zenith_Surface
531 atmabsorption_ad%Optical_Depth =
zero 535 predictor%Ref_Level_LnPressure, &
536 predictor%User_Level_LnPressure, &
541 user_od_path_ad(0) =
zero 547 DO k = n_layers, 1, -1
548 od_path_ad(k-1) = od_path_ad(k-1) + od_path_ad(k)
550 od_ad(k) = od_path_ad(k)
552 IF(predictor%PAFV%OD(k) <
zero)
THEN 554 ELSE IF(predictor%PAFV%OD(k) >
max_od)
THEN 562 component_loop_ad:
DO j = 1, predictor%n_Components
569 np = tc%n_Predictors(j, channelindex)
572 IF( np <= 0 ) cycle component_loop_ad
574 IF( predictor%OPTRAN .AND. j == tc%OComponent_Index)
THEN 590 j0 = tc%Pos_Index(j, channelindex)
592 js = j0+(i-1)*n_layers-1
593 DO k = n_layers, 1, -1
594 predictor_ad%X(k, i, j) = predictor_ad%X(k, i, j) + tc%C(js+k)*od_ad(k)
600 END DO component_loop_ad
668 ChannelIndex, & ! Input
669 Predictor , & ! Input
672 TYPE(ODPS_type),
INTENT(IN) :: TC
673 INTEGER,
INTENT(IN) :: ChannelIndex
674 TYPE(ODPS_Predictor_type),
INTENT(IN OUT) :: Predictor
675 REAL(fp),
INTENT(IN OUT) :: OD(:)
677 REAL(fp) :: LN_Chi(TC%n_Layers), coeff(0:MAX_OPTRAN_ORDER)
678 REAL(fp) :: b(TC%n_Layers, 0:MAX_OPTRAN_USED_PREDICTORS)
679 REAL(fp) :: Chi(TC%n_Layers)
680 INTEGER :: np, n_Layers, n_orders, js, i, j, k, ii, jj
686 np = tc%OP_Index(0,channelindex)
687 IF ( np <= 0 )
RETURN 689 n_layers = tc%n_Layers
690 js = tc%OPos_Index(channelindex)
691 n_orders = tc%Order(channelindex)
694 jj = js + i*(n_orders+1)
695 coeff(0:n_orders) = tc%OC(jj:jj+n_orders)
699 b(k,i) = b(k,i) + coeff(j)*predictor%Ap(k, j)
706 ii = tc%OP_Index(i,channelindex)
708 ln_chi(k) = ln_chi(k) + b(k, i)* predictor%OX(k, ii)
718 chi(k) = exp(ln_chi(k))
720 od(k) = od(k) + chi(k)*predictor%dA(k)
723 IF(predictor%PAFV%OPTRAN)
THEN 725 predictor%PAFV%LN_Chi = ln_chi
726 predictor%PAFV%Chi = chi
799 TYPE(ODPS_type),
INTENT(IN) :: TC
800 INTEGER,
INTENT(IN) :: ChannelIndex
801 TYPE(ODPS_Predictor_type),
INTENT(IN) :: Predictor
802 TYPE(ODPS_Predictor_type),
INTENT(IN) :: Predictor_TL
803 REAL(fp),
INTENT(IN OUT) :: OD_TL(:)
805 REAL(fp) :: coeff(0:MAX_OPTRAN_ORDER)
806 REAL(fp) :: LN_Chi_TL(TC%n_Layers), b_TL(TC%n_Layers, 0:MAX_OPTRAN_USED_PREDICTORS)
807 REAL(fp) :: chi_TL(TC%n_Layers)
808 INTEGER :: np, n_Layers, n_orders, js, i, j, k, ii, jj
814 np = tc%OP_Index(0,channelindex)
815 IF ( np <= 0 )
RETURN 817 n_layers = tc%n_Layers
818 js = tc%OPos_Index(channelindex)
819 n_orders = tc%Order(channelindex)
822 jj = js + i*(n_orders+1)
823 coeff(0:n_orders) = tc%OC(jj:jj+n_orders)
827 b_tl(k,i) = b_tl(k,i) + coeff(j)*predictor_tl%Ap(k, j)
832 ln_chi_tl = b_tl(:,0)
834 ii = tc%OP_Index(i,channelindex)
836 ln_chi_tl(k) = ln_chi_tl(k) + b_tl(k, i)* predictor%OX(k, ii) + predictor%PAFV%b(k, i)* predictor_tl%OX(k, ii)
841 IF( predictor%PAFV%LN_Chi(k) >
limit_exp )
THEN 843 ELSE IF( predictor%PAFV%LN_Chi(k) < -
limit_exp )
THEN 846 chi_tl(k) = predictor%PAFV%Chi(k) * ln_chi_tl(k)
848 od_tl(k) = od_tl(k) + chi_tl(k)*predictor%dA(k) + predictor%PAFV%Chi(k)*predictor_tl%dA(k)
920 TYPE(ODPS_type),
INTENT(IN) :: TC
921 INTEGER,
INTENT(IN) :: ChannelIndex
922 TYPE(ODPS_Predictor_type),
INTENT(IN) :: Predictor
923 REAL(fp),
INTENT(IN OUT) :: OD_AD(:)
924 TYPE(ODPS_Predictor_type),
INTENT(IN OUT) :: Predictor_AD
926 REAL(fp) :: coeff(0:MAX_OPTRAN_ORDER)
927 REAL(fp) :: LN_Chi_AD(TC%n_Layers), b_AD(TC%n_Layers, 0:MAX_OPTRAN_USED_PREDICTORS)
928 REAL(fp) :: Chi_AD(TC%n_Layers)
929 INTEGER :: np, n_Layers, n_orders, js, i, j, k, ii, jj
937 np = tc%OP_Index(0,channelindex)
938 IF ( np <= 0 )
RETURN 940 n_layers = tc%n_Layers
941 js = tc%OPos_Index(channelindex)
942 n_orders = tc%Order(channelindex)
953 DO k = n_layers, 1, -1
955 chi_ad(k) = chi_ad(k) + od_ad(k) * predictor%dA(k)
956 predictor_ad%dA(k) = predictor_ad%dA(k) + od_ad(k) * predictor%PAFV%Chi(k)
957 IF( predictor%PAFV%LN_Chi(k) >
limit_exp )
THEN 959 ELSE IF( predictor%PAFV%LN_Chi(k) < -
limit_exp )
THEN 962 ln_chi_ad(k) = predictor%PAFV%Chi(k) * chi_ad(k)
967 ii = tc%OP_Index(i,channelindex)
968 DO k = n_layers, 1, -1
969 b_ad(k, i) = ln_chi_ad(k) * predictor%OX(k, ii)
970 predictor_ad%OX(k, ii) = predictor_ad%OX(k, ii) + ln_chi_ad(k)*predictor%PAFV%b(k, i)
973 b_ad(:,0) = ln_chi_ad
976 jj = js + i*(n_orders+1)
977 coeff(0:n_orders) = tc%OC(jj:jj+n_orders)
978 DO k = n_layers, 1, -1
980 predictor_ad%Ap(k, j) = predictor_ad%Ap(k, j) + coeff(j)*b_ad(k,i)
real(fp), parameter, public zero
integer, parameter, public max_optran_used_predictors
integer, parameter, public fp
real(fp), parameter, public limit_exp
subroutine add_optran_wlood_ad(TC, ChannelIndex, Predictor, OD_AD, Predictor_AD)
real(fp), parameter, public limit_log
subroutine, public odps_compute_atmabsorption(TC, ChannelIndex, Predictor, AtmAbsorption)
integer, parameter, public significance_optran
subroutine add_optran_wlood_tl(TC, ChannelIndex, Predictor, Predictor_TL, OD_TL)
character(*), parameter, private module_version_id
subroutine, public odps_compute_atmabsorption_ad(TC, ChannelIndex, Predictor, AtmAbsorption_AD, Predictor_AD)
subroutine, public interpolate_profile_f1_tl(interp_index, x, u, y_TL, y_int_TL)
subroutine add_optran_wlood(TC, ChannelIndex, Predictor, OD)
subroutine, public compute_interp_index(x, u, interp_index)
real(fp), parameter max_od
subroutine, public interpolate_profile(interp_index, y, x, u, y_int)
subroutine, public interpolate_profile_f1_ad(interp_index, x, u, y_int_AD, y_AD)
elemental subroutine, public crtm_geometryinfo_getvalue(gInfo, Geometry, iFOV, Longitude, Latitude, Surface_Altitude, Sensor_Scan_Angle, Sensor_Zenith_Angle, Sensor_Azimuth_Angle, Source_Zenith_Angle, Source_Azimuth_Angle, Flux_Zenith_Angle, Year, Month, Day, Distance_Ratio, Sensor_Scan_Radian, Sensor_Zenith_Radian, Sensor_Azimuth_Radian, Secant_Sensor_Zenith, Cosine_Sensor_Zenith, Source_Zenith_Radian, Source_Azimuth_Radian, Secant_Source_Zenith, Flux_Zenith_Radian, Secant_Flux_Zenith, Trans_Zenith_Radian, Secant_Trans_Zenith, AU_ratio2)
subroutine, public odps_compute_atmabsorption_tl(TC, ChannelIndex, Predictor, Predictor_TL, AtmAbsorption_TL)
integer, parameter, public max_optran_order