8 integer,
private :: TOTAL_POINTS, total_taus, max_allowable_tau
9 real,
dimension(:),
allocatable,
private :: taux, rfx
17 real,
dimension(:),
intent(in) :: library_taus
20 total_taus =
size(library_taus)
21 total_points = total_taus+1
22 max_allowable_tau = library_taus(total_taus)
24 allocate(taux(total_points))
25 allocate(rfx(total_points))
29 taux(i+1) = library_taus(i)
42 extinction_efficiency, water_path)
49 real,
intent(in) :: tau, re, density
50 real,
dimension(:),
intent(in) :: extinction_efficiency, library_re
51 real,
intent(out) :: water_path
54 real :: x(2), y(2), Qe
61 x(1) = library_re(ilo)
62 x(2) = library_re(ihi)
63 y(1) = extinction_efficiency(ilo)
64 y(2) = extinction_efficiency(ihi)
68 water_path = ( 4. * tau * re * density ) / (3. * qe)
73 nonabsorbing_index, nonabsorbing_albedo, library_taus, &
74 library_radii, sfr,fti1,fti0, rfi, theta, theta0, phi, &
75 cloudtop_pressure, process, optical_thickness_vector)
113 integer,
intent(in) :: nonabsorbing_index
115 real,
intent(in) :: reflectance_nonabsorbing, nonabsorbing_albedo, &
116 theta, theta0, phi, cloudtop_pressure
117 real(single),
dimension (:),
intent(in) :: library_taus, library_radii
118 real(single),
dimension (:,:,:),
intent(in) :: sfr, fti1, fti0, rfi
120 real,
intent(out) :: optical_thickness_vector(:)
125 integer :: radii, i, ii
126 integer :: correction_iteration, maximum_correction_iterations
127 real :: reflectance_corrected, local_reflectance_nonabsorbing, &
132 real,
dimension(:),
allocatable :: rfi1
138 radii =
size(library_radii)
140 allocate( rfi1(radii) )
155 rfi1(1:radii) = rfi(total_taus,nonabsorbing_index,1:radii)
157 rfi1(1:radii) = rfi(total_points,nonabsorbing_index,1:radii)
165 local_reflectance_nonabsorbing = reflectance_nonabsorbing
169 if (nonabsorbing_index==1 .or. nonabsorbing_index == 2) then
171 if (nonabsorbing_index==1) then
173 maximum_correction_iterations = 3
175 maximum_correction_iterations = 1
180 rfx(1) = nonabsorbing_albedo
183 rfx(2:total_points) = rfi(1:total_taus, nonabsorbing_index, i) + &
184 (nonabsorbing_albedo * fti1(1:total_taus, nonabsorbing_index, i) * &
185 fti0(1:total_taus, nonabsorbing_index, i)) / &
186 ( 1.0 - nonabsorbing_albedo * sfr(1:total_taus, nonabsorbing_index, i))
188 rfx(1:total_points) = rfi(1:total_points, nonabsorbing_index, i)
193 refliba(1:total_points, i) = rfx(:)
195 do correction_iteration=1, maximum_correction_iterations
199 if ( (rfi1(i) - local_reflectance_nonabsorbing) < 0.0001) then
200 optical_thickness_vector(i) = max_allowable_tau
207 optical_thickness_vector(i) = optical_thickness
210 if ( (nonabsorbing_index == 1 .or. nonabsorbing_index == 2) .and. &
211 optical_thickness > 0. .and. maximum_correction_iterations /= 1 ) then
213 if (nonabsorbing_index == 1 .and. optical_thickness > 0. .and. &
214 maximum_correction_iterations /= 1 ) then
217 process, optical_thickness, nonabsorbing_albedo, &
218 fti1(:,nonabsorbing_index,i),fti0(:,nonabsorbing_index,i), &
219 sfr(:,nonabsorbing_index,i), nonabsorbing_index,i,theta0,theta,phi, &
220 reflectance_corrected)
222 local_reflectance_nonabsorbing = reflectance_corrected
225 if (process%icecloud == 1)
then
227 else if (process%watercloud == 1)
then
231 if (local_reflectance_nonabsorbing > rfi1(i)) then
232 optical_thickness_vector(i) = max_allowable_tau
242 if ( (rfi1(i) - local_reflectance_nonabsorbing) < 0.0001) &
243 optical_thickness_vector(i) = max_allowable_tau
247 optical_thickness_vector(i) = optical_thickness
253 if(rfi1(i) < reflectance_nonabsorbing ) &
254 optical_thickness_vector(i) = max_allowable_tau
264 reflectance_absorbing, absorbing_index, absorbing_albedo, &
265 library_taus, library_radii, sfr,fti1,fti0, rfi, &
266 residual, maxradii, debug )
329 real,
intent(in) :: optical_thickness_vector(:), reflectance_absorbing, &
332 integer,
intent(in) :: absorbing_index
334 real(single),
intent(in) :: library_taus(:), library_radii(:), &
335 sfr(:,:,:), fti1(:,:,:), fti0(:,:,:), rfi(:,:,:)
337 real,
intent(out) :: residual(:)
338 logical,
intent(in) :: debug
339 integer,
intent(out) :: maxradii
344 real,
allocatable :: rfi1(:)
345 real,
allocatable :: localoptical_thickness_vector(:)
348 integer :: radii, i, ii
352 integer :: lowbound, highbound, taubounds(2)
353 real :: iftau(2), refvals(2)
362 radii =
size(library_radii)
366 allocate(rfi1(radii))
368 allocate(localoptical_thickness_vector(radii))
375 if (optical_thickness_vector(i) > 0. )
exit
386 localoptical_thickness_vector = optical_thickness_vector
391 rfi1(1:radii) = rfi(total_taus,absorbing_index,1:radii)
393 rfi1(1:radii) = rfi(total_points,absorbing_index,1:radii)
407 rfx(1) = absorbing_albedo
409 rfx(2:total_points) = rfi(1:(total_points-1),absorbing_index,i) + &
410 fti1(1:(total_points-1),absorbing_index,i) * &
411 fti0(1:(total_points-1),absorbing_index,i) * &
413 ( 1.-absorbing_albedo*sfr(1:(total_points-1),absorbing_index,i))
415 rfx(1:total_points) = rfi(1:total_points,absorbing_index,i)
420 reflibb(1:total_points, i) = rfx(:)
424 taubounds(1) = lowbound
425 taubounds(2) = highbound
426 iftau(1) = taux(taubounds(1))
427 iftau(2) = taux(taubounds(2))
429 refvals(1) = rfx(lowbound)
430 refvals(2) = rfx(highbound)
434 residual(i) = rf1/reflectance_absorbing- 1.0
439 deallocate(rfi1, localoptical_thickness_vector)
445 optical_thickness_vector, optical_thickness)
466 real,
intent(in) :: reflectance, reflectance_vector(:), &
467 optical_thickness_vector(:)
468 real,
intent(out):: optical_thickness
470 integer :: refl_size, tau_size
471 integer :: lowbound, highbound, refbounds(2)
472 real :: ifref(2), tauvals(2)
478 refl_size =
size(reflectance_vector)
480 if (reflectance < reflectance_vector(1) ) then
482 optical_thickness = - 1.
489 if ( reflectance > reflectance_vector(refl_size) )
then
490 tau_size =
size(optical_thickness_vector)
491 optical_thickness = optical_thickness_vector(tau_size)
499 call bisectionsearch(reflectance_vector, reflectance, lowbound, highbound)
500 refbounds(1) = lowbound
501 refbounds(2) = highbound
502 ifref(1) = reflectance_vector(refbounds(1))
503 ifref(2) = reflectance_vector(refbounds(2))
505 tauvals(1) = optical_thickness_vector(lowbound)
506 tauvals(2) = optical_thickness_vector(highbound)
512 optical_thickness, nonabsorbing_galbedo, fti1, fti0, sfr, iw, ir, &
513 solarzenith, sensorzenith, azimuth, reflectance_corrected)
561 integer,
intent(in) :: iw, ir
562 real,
intent(in) :: reflectance, cloudtoppressure, &
563 optical_thickness, nonabsorbing_galbedo, &
564 solarzenith, sensorzenith, azimuth
565 real,
intent(in) :: sfr(:), fti0(:), fti1(:)
567 real,
intent(out) :: reflectance_corrected
570 real :: taur, rd, cloud_albedo
571 real :: mu0, mu, flux0, flux1, pray, x, refl_s
572 real :: local_int_fluxup_solar,local_int_fluxup_sensor
574 real,
parameter :: surfacepressure = 1013.
575 real,
parameter :: Cm = 0.84
576 real,
parameter :: taur0(2) = (/0.044, 0.025/)
582 local_int_fluxup_solar=0.; local_int_fluxup_sensor=0.
583 reflectance_corrected=0.
587 taur = taur0(iw)*cloudtoppressure/surfacepressure
589 mu0 = cos(
d2r*solarzenith)
590 mu = cos(
d2r*sensorzenith)
592 if(process%icecloud == 1) then
594 nonabsorbing_galbedo, sfr, fti1, fti0, iw, ir, &
599 nonabsorbing_galbedo, sfr, fti1, fti0, iw, ir, &
602 local_int_fluxup_sensor)
614 x = -mu0*mu + sqrt((1.-mu0**2)*(1.-mu**2))*cos(
d2r*azimuth)
615 pray = 3.*(1.+x**2)/4.0
620 refl_s = taur*pray/(4.*mu0*mu) + &
621 0.5*taur* local_int_fluxup_sensor * exp(-taur/mu )/mu0 + &
622 0.5*taur* local_int_fluxup_solar * exp(-taur/mu0)/mu
626 reflectance_corrected = (reflectance - refl_s)*exp(cm*taur*(1./mu0 + 1./mu))
631 optical_thickness, nonabsorbing_galbedo, sfr, fti1, fti0, iw, ir, &
632 fluxsolarzenithangles, fluxsensorzenithangles, &
633 fluxup_solar, fluxup_sensor, interp_fluxup_solar, interp_fluxup_sensor)
659 integer,
intent(in) :: iw, ir
660 real,
intent(in) :: miu0, miu, optical_thickness, nonabsorbing_galbedo
661 real,
intent(in) :: sfr(:), fti0(:), fti1(:)
662 real,
dimension(:),
intent(in) :: fluxsolarzenithangles, &
663 fluxsensorzenithangles
664 real,
dimension(:,:,:,:),
intent(in) :: fluxup_solar, fluxup_sensor
666 real,
intent(out) :: interp_fluxup_solar, interp_fluxup_sensor
669 integer :: lowbound, highbound, its, nts, taubounds(2)
670 real :: scaledTau, iftaus(2), angles(2), functionvalues(2)
671 real :: q1, interp_fti0, interp_fti1, interp_sfr
672 real,
dimension(:),
allocatable :: fluxup_solar_tau,fluxup_sensor_tau
715 interp_fluxup_solar=0.; interp_fluxup_sensor=0.
719 allocate(fluxup_solar_tau(nts),fluxup_sensor_tau(nts))
720 interp_fluxup_solar = 0.; interp_fluxup_sensor = 0.
721 taubounds = 0; lowbound=0; highbound=0; iftaus=0.
743 taubounds(1) = lowbound
744 taubounds(2) = highbound
753 if (nonabsorbing_galbedo > 0.)
then
756 functionvalues(1) = 1.
757 functionvalues(2) = fti0(1)
759 functionvalues(1) = 1.
760 functionvalues(2) = fti1(1)
762 functionvalues(1) = 0.
763 functionvalues(2) = sfr(1)
766 functionvalues(1) = fti0(lowbound)
767 functionvalues(2) = fti0(highbound)
769 functionvalues(1) = fti1(lowbound)
770 functionvalues(2) = fti1(highbound)
772 functionvalues(1) = sfr(lowbound)
773 functionvalues(2) = sfr(highbound)
785 angles(1) = fluxsolarzenithangles(lowbound)
786 angles(2) = fluxsolarzenithangles(highbound)
789 functionvalues(1) = fluxup_solar(lowbound,its, iw,ir)
790 functionvalues(2) = fluxup_solar(highbound,its,iw,ir)
795 functionvalues(1) = 0.
796 functionvalues(2) = fluxup_solar_tau(taubounds(1))
798 functionvalues(1) = fluxup_solar_tau(taubounds(1))
799 functionvalues(2) = fluxup_solar_tau(taubounds(2))
808 angles(1) = fluxsensorzenithangles(lowbound)
809 angles(2) = fluxsensorzenithangles(highbound)
812 functionvalues(1) = fluxup_sensor(lowbound, its,iw,ir)
813 functionvalues(2) = fluxup_sensor(highbound,its,iw,ir)
818 functionvalues(1) = 0.
819 functionvalues(2) = fluxup_sensor_tau(taubounds(1))
821 functionvalues(1) = fluxup_sensor_tau(taubounds(1))
822 functionvalues(2) = fluxup_sensor_tau(taubounds(2))
834 if (nonabsorbing_galbedo > 0.)
then
836 interp_fluxup_solar = interp_fluxup_solar + &
837 interp_fti0*nonabsorbing_galbedo*(1-interp_sfr)/ &
838 (1 - interp_sfr*nonabsorbing_galbedo)
839 interp_fluxup_sensor = interp_fluxup_sensor + &
840 interp_fti1*nonabsorbing_galbedo*(1-interp_sfr)/ &
841 (1 - interp_sfr*nonabsorbing_galbedo)
849 deallocate(fluxup_solar_tau,fluxup_sensor_tau)
854 reflectance_absorbing, absorbing_index, absorbing_albedo, &
855 xpoint, ypoint, CTT, thermal_trans_1way, thermal_trans_2way, &
856 library_taus, library_radii, sfr,fti1,fti0,fri1, rfi, cl_emis, sf_emis, &
857 residual, maxradii, channel_number_37, emission_uncertainty_pw, &
858 emission_uncertainty_Tc, sigma_R37_PW, debug)
898 character*(*),
intent(in):: platform_name
900 real,
intent(in) :: optical_thickness_vector(:), reflectance_absorbing, &
903 integer,
intent(in) :: absorbing_index, channel_number_37, xpoint, ypoint
905 real,
intent(in) :: thermal_trans_2way,thermal_trans_1way, CTT
907 real(single),
intent(in) :: library_taus(:), library_radii(:), &
908 sfr(:,:,:), fti1(:,:,:), fti0(:,:,:), fri1(:,:,:), &
909 rfi(:,:,:), cl_emis(:,:,:), sf_emis(:,:,:)
911 real,
intent(inout) :: emission_uncertainty_pw(:), &
912 emission_uncertainty_Tc(:), sigma_R37_PW(:)
913 logical,
intent(in) :: debug
914 real,
intent(out) :: residual(:)
915 integer,
intent(out) :: maxradii
917 integer :: radii, wavelengths,i
918 real :: ReflectanceSolarMeasured,rf1, rtherm37
919 real :: tc, local_trans_1way, local_trans_2way
920 real,
allocatable :: localoptical_thickness_vector(:), rfi1(:)
923 real :: rtherm37_high, rtherm37_low, rsm_low, rsm_high
924 real :: emission_low, emission_high, emission_reg
927 real :: Es, Ec, Es_gnd, B_Tc, sigmaZ1, sigmaZ2
928 real :: B_Tg, B_Tc_low, B_Tc_high, Z2_term, Trans_ratio, sigmaPW_squared
936 radii =
size(library_radii)
946 allocate(localoptical_thickness_vector(radii))
947 allocate(rfi1(radii))
960 if (optical_thickness_vector(i) > 0. )
exit
964 rfi1(1:radii) = rfi(total_taus,absorbing_index,1:radii)
966 rfi1(1:radii) = rfi(total_points,absorbing_index,1:radii)
969 localoptical_thickness_vector = optical_thickness_vector
971 if (thermal_trans_1way < 0. .or. thermal_trans_1way > 1.) then
972 local_trans_1way = 1.
974 local_trans_1way = thermal_trans_1way
977 if (thermal_trans_2way < 0. .or. thermal_trans_2way > 1.) then
978 local_trans_2way = 1.
980 local_trans_2way = thermal_trans_2way
987 b_tc =
modis_planck(platform_name, ctt, channel_number_37, 1)
989 channel_number_37, 1)
991 channel_number_37, 1)
993 channel_number_37, 1)
994 sigmaz1 =
const_c * (reflectance_absorbing / (local_trans_2way**2)) &
1002 localoptical_thickness_vector(i), sfr(:,absorbing_index,i), &
1003 rfi1(i), fti0(:,absorbing_index,i), fti1(:,absorbing_index,i), &
1004 fri1(:,absorbing_index,i), rfi(:,absorbing_index,i), &
1005 absorbing_albedo, b_tg, b_tc, rf1, &
1006 rtherm37, channel_number_37,
reflibb(:,i), es, ec)
1008 es_gnd = 1. - absorbing_albedo
1011 localoptical_thickness_vector(i), b_tg, b_tc, &
1012 rfi(:, absorbing_index, i), cl_emis(:,1,i), sf_emis(:,1,i), rf1, &
1013 rtherm37, channel_number_37, es, ec)
1016 reflibb(:,i) = rfi(:, absorbing_index, i)
1021 emission_reg = rtherm37
1022 rtherm37 = rtherm37 * local_trans_1way
1029 ( ec*
bprime_tc + ( es_gnd + ec*b_tc) * trans_ratio )**2 * &
1032 sigmaz2 =
const_c * (local_trans_1way / local_trans_2way) * sqrt(z2_term)
1036 sigma_r37_pw(i) = sigmaz1**2 + sigmaz2**2 - 2*
abs(sigmaz1*sigmaz2)
1049 reflectancesolarmeasured =
const_c * reflectance_absorbing
1051 reflectancesolarmeasured =
const_c * (reflectance_absorbing-rtherm37)
1053 reflectancesolarmeasured = reflectancesolarmeasured / local_trans_2way
1057 residual(i) = ( rf1 / reflectancesolarmeasured ) - 1.
1063 if (rtherm37 .gt. reflectance_absorbing) then
1064 residual(i) = 10000.
1070 deallocate( rfi1, localoptical_thickness_vector)
1076 fti0, fti1, fri1, rfi, galbedo, B_Tg, B_Tc, rf1, &
1077 rtherm37, channel_number_37, reflib, Es, Ec )
1117 character*(*),
intent(in) :: platform_name
1119 real,
intent(in) :: taux(:)
1121 real(single),
intent(in) :: sfr(:), &
1122 fti1(:), fri1(:), fti0(:),rfi(:)
1123 real,
dimension(:),
intent(inout) :: reflib(:)
1124 real,
intent(in) :: tc, galbedo, rfi1, B_Tg, B_Tc
1125 integer,
intent(in) :: channel_number_37
1127 real,
intent(out) :: rtherm37, rf1, Es, Ec
1130 real :: sfr1,rthermc, rthermg, frefl1, trans
1132 real,
dimension(:),
allocatable :: tranx, frefl, local_sfr
1135 integer :: lowbound, highbound, taubounds(2)
1136 real :: iftaus(2), functionvalues(2)
1138 real intensity, intensity_g
1146 nts = total_points - 1
1148 allocate(tranx(total_points), frefl(total_points), local_sfr(total_points))
1158 local_sfr(2:total_points) = sfr(1:nts)
1171 rfx(i+1) = rfi(i)+fti1(i)*fti0(i)*galbedo/ (1.-galbedo*sfr(i))
1174 tranx(i+1) = fti1(i)
1177 frefl(i+1) = fri1(i)
1187 taubounds(1) = lowbound
1188 taubounds(2) = highbound
1189 iftaus(1) = taux(taubounds(1))
1190 iftaus(2) = taux(taubounds(2))
1196 functionvalues(1) = rfx(lowbound)
1197 functionvalues(2) = rfx(highbound)
1199 functionvalues(1) = frefl(lowbound)
1200 functionvalues(2) = frefl(highbound)
1202 functionvalues(1) = tranx(lowbound)
1203 functionvalues(2) = tranx(highbound)
1205 functionvalues(1) = local_sfr(lowbound)
1206 functionvalues(2) = local_sfr(highbound)
1212 rthermc = (1.- trans - frefl1) * intensity
1214 ec = (1.- trans - frefl1)
1220 rthermg = trans*(1.-galbedo) * intensity_g / (1.-sfr1*galbedo)
1222 es = trans*(1.-galbedo) / (1.-sfr1*galbedo)
1225 rtherm37 = rthermc + rthermg
1228 deallocate(tranx, frefl, local_sfr)
1234 B_Tc, rfi, cl_emis, sf_emis, rf1, rtherm37, channel_number_37, Es, Ec)
1255 character*(*),
intent(in) :: platform_name
1256 real,
intent(in) :: taux(:)
1257 real(single),
intent(in) :: cl_emis(:), sf_emis(:), rfi(:)
1258 real,
intent(in) :: tc, B_Tg, B_Tc
1259 integer,
intent(in) :: channel_number_37
1260 real,
intent(out) :: rtherm37, rf1, Es, Ec
1263 real :: surface_emissivity, cloud_emissivity, rthermc, rthermg
1265 integer :: lowbound, highbound, taubounds(2)
1266 real :: iftaus(2), functionvalues(2)
1268 real intensity, intensity_g
1280 taubounds(1) = lowbound
1281 taubounds(2) = highbound
1282 iftaus(1) = taux(taubounds(1))
1283 iftaus(2) = taux(taubounds(2))
1288 functionvalues(1) = rfi(lowbound)
1289 functionvalues(2) = rfi(highbound)
1291 functionvalues(1) = cl_emis(lowbound)
1292 functionvalues(2) = cl_emis(highbound)
1294 functionvalues(1) = sf_emis(lowbound)
1295 functionvalues(2) = sf_emis(highbound)
1300 rthermc = cloud_emissivity * intensity
1302 ec = cloud_emissivity
1308 rthermg = surface_emissivity * intensity_g
1310 es = surface_emissivity
1313 rtherm37 = rthermc + rthermg
1318 subroutine calculate_new_tc(platform_name, Tc, Tg, galbedo, wlen, tau, re, &
1319 lib_taus, lib_res, sph_albedo, down_flux_sensor, up_flux_sensor, &
1320 cloud_emiss, surface_emiss, newTc, PRN)
1346 character(*),
intent(in) :: platform_name
1347 real,
intent(in) :: Tc, Tg, tau, re, galbedo
1348 integer,
intent(in) :: wlen
1349 real,
dimension(:),
intent(in) :: lib_taus, lib_res
1350 real,
dimension(:,:,:),
intent(in) :: sph_albedo, down_flux_sensor, &
1351 up_flux_sensor, cloud_emiss, surface_emiss
1352 real,
intent(inout) :: newTc
1353 logical,
intent(in) :: PRN
1355 integer :: lowbound_tau, highbound_tau
1356 real :: taubounds(2), rebounds(2)
1357 integer :: lowbound_re, highbound_re
1358 real :: iftaus(2), forint(2,2)
1364 real :: BTg, BTc, BTcr, temp_T_low, temp_T_high
1366 real :: frefl1, trans, sfr1
1386 taubounds(1) = taux(lowbound_tau)
1387 taubounds(2) = taux(highbound_tau)
1388 rebounds(1) = lib_res(lowbound_re)
1389 rebounds(2) = lib_res(highbound_re)
1394 forint(1,1) = cloud_emiss(lowbound_tau, 2, lowbound_re)
1395 forint(1,2) = cloud_emiss(highbound_tau, 2, lowbound_re)
1396 forint(2,1) = cloud_emiss(lowbound_tau, 2, highbound_re)
1397 forint(2,2) = cloud_emiss(highbound_tau, 2, highbound_re)
1402 forint(1,1) = surface_emiss(lowbound_tau, 2, lowbound_re)
1403 forint(1,2) = surface_emiss(highbound_tau, 2, lowbound_re)
1404 forint(2,1) = surface_emiss(lowbound_tau, 2, highbound_re)
1405 forint(2,2) = surface_emiss(highbound_tau, 2, highbound_re)
1411 lowbound_tau = lowbound_tau - 1
1412 highbound_tau = highbound_tau - 1
1414 if(highbound_re < 1) highbound_re = 1
1415 if(lowbound_re < 1) lowbound_re = 1
1416 if (highbound_tau < 1) highbound_tau = 1
1417 if (lowbound_tau < 1) lowbound_tau = 1
1419 if (lowbound_tau == 0)
then
1423 forint(1,1) = sph_albedo(lowbound_tau, wlen, lowbound_re)
1424 forint(2,1) = sph_albedo(lowbound_tau, wlen, highbound_re)
1427 forint(2,2) = sph_albedo(highbound_tau, wlen, highbound_re)
1428 forint(1,2) = sph_albedo(highbound_tau, wlen, lowbound_re)
1433 if (lowbound_tau == 0)
then
1437 forint(1,1) = down_flux_sensor(lowbound_tau, wlen, lowbound_re)
1438 forint(2,1) = down_flux_sensor(lowbound_tau, wlen, highbound_re)
1441 forint(2,2) = down_flux_sensor(highbound_tau, wlen, highbound_re)
1442 forint(1,2) = down_flux_sensor(highbound_tau, wlen, lowbound_re)
1447 if (lowbound_tau == 0)
then
1451 forint(1,1) = up_flux_sensor(lowbound_tau, wlen, lowbound_re)
1452 forint(2,1) = up_flux_sensor(lowbound_tau, wlen, highbound_re)
1455 forint(2,2) = up_flux_sensor(highbound_tau, wlen, highbound_re)
1456 forint(1,2) = up_flux_sensor(highbound_tau, wlen, lowbound_re)
1460 ec = 1.- trans - frefl1
1461 eg = trans*(1.-galbedo) / (1.-sfr1*galbedo)
1468 btc = (btcr - eg*btg) / ec
1478 btc = (btcr - eg*btg) / ec
1486 btc = (btcr - eg*btg) / ec
1493 if (temp_t_high < newtc .or. temp_t_low > newtc)
then