68 '$Id: RTV_Define.f90 60152 2015-08-13 19:19:13Z paul.vandelst@noaa.gov $' 97 LOGICAL :: rt = .false.
115 INTEGER :: n_layers = 0
116 INTEGER :: n_added_layers = 0
117 INTEGER :: n_angles = 0
118 INTEGER :: n_soi_iterations = 0
122 REAL(fp):: solar_irradiance =
zero 123 REAL(fp):: cosmic_background_radiance =
zero 129 REAL(fp) :: down_solar_radiance =
zero 131 REAL(fp) :: secant_down_angle = 0
134 REAL(fp),
DIMENSION( 0:MAX_N_LAYERS ) :: e_cloud_radiance_up=
zero 135 REAL(fp),
DIMENSION( 0:MAX_N_LAYERS ) :: e_source_up =
zero 136 REAL(fp),
DIMENSION( 0:MAX_N_LAYERS ) :: e_level_trans_up =
one 140 REAL(fp),
DIMENSION( MAX_N_LAYERS ) :: e_layer_trans_up =
zero 141 REAL(fp),
DIMENSION( MAX_N_LAYERS ) :: e_layer_trans_down =
zero 142 REAL(fp),
DIMENSION( 0:MAX_N_LAYERS ) :: e_level_rad_up =
zero 143 REAL(fp),
DIMENSION( 0:MAX_N_LAYERS ) :: e_level_rad_down =
zero 146 REAL(fp) :: planck_surface =
zero 147 REAL(fp),
DIMENSION( 0:MAX_N_LAYERS ) :: planck_atmosphere =
zero 150 REAL(fp),
DIMENSION( MAX_N_ANGLES ) :: cos_angle =
zero 151 REAL(fp),
DIMENSION( MAX_N_ANGLES ) :: cos_weight =
zero 154 LOGICAL :: diffuse_surface = .true.
155 LOGICAL :: is_solar_channel = .false.
161 INTEGER :: n_streams = 0
164 LOGICAL :: solar_flag_true = .false.
165 LOGICAL :: visible_flag_true = .false.
166 LOGICAL :: scattering_rt = .false.
172 LOGICAL :: is_allocated = .false.
176 REAL(fp),
ALLOCATABLE :: pff(:,:,:)
177 REAL(fp),
ALLOCATABLE :: pbb(:,:,:)
180 REAL(fp),
ALLOCATABLE :: pplus(:,:)
181 REAL(fp),
ALLOCATABLE :: pminus(:,:)
182 REAL(fp),
ALLOCATABLE :: pleg(:,:)
187 REAL(fp),
ALLOCATABLE :: off(:,:,:)
188 REAL(fp),
ALLOCATABLE :: obb(:,:,:)
192 REAL(fp),
ALLOCATABLE :: n_factor(:,:)
193 REAL(fp),
ALLOCATABLE :: sum_fac(:,:)
196 REAL(fp),
ALLOCATABLE :: inv_gamma(:,:,:)
197 REAL(fp),
ALLOCATABLE :: inv_gammat(:,:,:)
198 REAL(fp),
ALLOCATABLE :: refl_trans(:,:,:)
200 REAL(fp),
ALLOCATABLE :: s_layer_trans(:,:,:)
201 REAL(fp),
ALLOCATABLE :: s_layer_refl(:,:,:)
203 REAL(fp),
ALLOCATABLE :: s_level_refl_up(:,:,:)
204 REAL(fp),
ALLOCATABLE :: s_level_rad_up(:,:)
206 REAL(fp),
ALLOCATABLE :: s_layer_source_up(:,:)
207 REAL(fp),
ALLOCATABLE :: s_layer_source_down(:,:)
214 REAL(fp),
ALLOCATABLE :: thermal_c(:,:)
215 REAL(fp),
ALLOCATABLE :: eigva(:,:)
216 REAL(fp),
ALLOCATABLE :: exp_x(:,:)
217 REAL(fp),
ALLOCATABLE :: eigvalue(:,:)
220 REAL(fp),
ALLOCATABLE :: hh(:,:,:)
221 REAL(fp),
ALLOCATABLE :: pm(:,:,:)
222 REAL(fp),
ALLOCATABLE :: pp(:,:,:)
223 REAL(fp),
ALLOCATABLE :: ppm(:,:,:)
224 REAL(fp),
ALLOCATABLE :: ppp(:,:,:)
225 REAL(fp),
ALLOCATABLE :: i_ppm(:,:,:)
226 REAL(fp),
ALLOCATABLE :: i_ppp(:,:,:)
227 REAL(fp),
ALLOCATABLE :: eigve(:,:,:)
228 REAL(fp),
ALLOCATABLE :: gm(:,:,:)
229 REAL(fp),
ALLOCATABLE :: i_gm(:,:,:)
230 REAL(fp),
ALLOCATABLE :: gp(:,:,:)
231 REAL(fp),
ALLOCATABLE :: eigvef(:,:,:)
232 REAL(fp),
ALLOCATABLE :: eigveva(:,:,:)
233 REAL(fp),
ALLOCATABLE :: a1(:,:,:)
234 REAL(fp),
ALLOCATABLE :: a2(:,:,:)
235 REAL(fp),
ALLOCATABLE :: a3(:,:,:)
236 REAL(fp),
ALLOCATABLE :: a4(:,:,:)
237 REAL(fp),
ALLOCATABLE :: a5(:,:,:)
238 REAL(fp),
ALLOCATABLE :: a6(:,:,:)
239 REAL(fp),
ALLOCATABLE :: gm_a5(:,:,:)
240 REAL(fp),
ALLOCATABLE :: i_gm_a5(:,:,:)
246 INTEGER :: number_soi_iter = 0
247 REAL(fp),
ALLOCATABLE :: e_layer_trans(:,:)
248 REAL(fp),
ALLOCATABLE :: s_level_iterrad_down(:,:,:)
249 REAL(fp),
ALLOCATABLE :: s_level_iterrad_up(:,:,:)
251 INTEGER ,
ALLOCATABLE :: number_doubling(:)
252 REAL(fp),
ALLOCATABLE :: delta_tau(:)
253 REAL(fp),
ALLOCATABLE :: refl(:,:,:,:)
254 REAL(fp),
ALLOCATABLE :: trans(:,:,:,:)
255 REAL(fp),
ALLOCATABLE :: inv_bet(:,:,:,:)
256 REAL(fp),
ALLOCATABLE :: c1(:,:)
257 REAL(fp),
ALLOCATABLE :: c2(:,:)
261 TYPE(sovar_type) :: sov
320 status = rtv%Is_Allocated
351 rtv%Is_Allocated = .false.
410 INTEGER ,
INTENT(IN) :: n_angles
411 INTEGER ,
INTENT(IN) :: n_legendre_terms
412 INTEGER ,
INTENT(IN) :: n_layers
414 INTEGER :: alloc_stat
417 IF ( n_angles < 1 .OR. n_legendre_terms < 1 .OR. n_layers < 1 )
RETURN 420 ALLOCATE( rtv%Pff(n_angles, n_angles+1, n_layers) , &
421 rtv%Pbb(n_angles, n_angles+1, n_layers) , &
422 rtv%Pplus( 0:n_legendre_terms, n_angles), &
423 rtv%Pminus(0:n_legendre_terms, n_angles), &
424 rtv%Pleg(0:n_legendre_terms, n_angles+1), &
425 rtv%Off(n_angles, n_angles+1, n_layers) , &
426 rtv%Obb(n_angles, n_angles+1, n_layers) , &
427 rtv%n_Factor (n_angles, n_layers) , &
428 rtv%sum_fac(0:n_angles, n_layers) , &
430 IF ( alloc_stat /= 0 )
RETURN 433 ALLOCATE( rtv%Inv_Gamma( n_angles, n_angles, n_layers) , &
434 rtv%Inv_GammaT(n_angles, n_angles, n_layers) , &
435 rtv%Refl_Trans(n_angles, n_angles, n_layers) , &
436 rtv%s_Layer_Trans(n_angles, n_angles, n_layers) , &
437 rtv%s_Layer_Refl( n_angles, n_angles, n_layers) , &
438 rtv%s_Level_Refl_UP(n_angles, n_angles, 0:n_layers), &
439 rtv%s_Level_Rad_UP(n_angles, 0:n_layers) , &
440 rtv%s_Layer_Source_UP( n_angles, n_layers) , &
441 rtv%s_Layer_Source_DOWN(n_angles, n_layers) , &
443 IF ( alloc_stat /= 0 )
RETURN 446 ALLOCATE( rtv%Thermal_C(n_angles, n_layers) , &
447 rtv%EigVa(n_angles, n_layers) , &
448 rtv%Exp_x(n_angles, n_layers) , &
449 rtv%EigValue(n_angles, n_layers) , &
450 rtv%HH(n_angles, n_angles, n_layers) , &
451 rtv%PM(n_angles, n_angles, n_layers) , &
452 rtv%PP(n_angles, n_angles, n_layers) , &
453 rtv%PPM(n_angles, n_angles, n_layers) , &
454 rtv%PPP(n_angles, n_angles, n_layers) , &
455 rtv%i_PPM(n_angles, n_angles, n_layers) , &
456 rtv%i_PPP(n_angles,n_angles,n_layers) , &
457 rtv%EigVe(n_angles, n_angles, n_layers) , &
458 rtv%Gm(n_angles, n_angles, n_layers) , &
459 rtv%i_Gm(n_angles, n_angles, n_layers) , &
460 rtv%Gp(n_angles, n_angles, n_layers) , &
461 rtv%EigVeF(n_angles, n_angles, n_layers) , &
462 rtv%EigVeVa(n_angles,n_angles,n_layers) , &
463 rtv%A1(n_angles,n_angles, n_layers) , &
464 rtv%A2(n_angles, n_angles, n_layers) , &
465 rtv%A3(n_angles, n_angles, n_layers) , &
466 rtv%A4(n_angles, n_angles, n_layers) , &
467 rtv%A5(n_angles, n_angles, n_layers) , &
468 rtv%A6(n_angles, n_angles, n_layers) , &
469 rtv%Gm_A5(n_angles, n_angles, n_layers) , &
470 rtv%i_Gm_A5(n_angles, n_angles, n_layers), &
472 IF ( alloc_stat /= 0 )
RETURN 475 ALLOCATE( rtv%e_Layer_Trans( n_angles, n_layers), &
478 rtv%Number_Doubling(n_layers), &
479 rtv%Delta_Tau(n_layers), &
483 rtv%C1(n_angles, n_layers), &
484 rtv%C2(n_angles, n_layers), &
486 IF ( alloc_stat /= 0 )
RETURN 489 rtv%n_Layers = n_layers
490 rtv%n_Angles = n_angles
492 rtv%n_SOI_Iterations = 0
495 rtv%Is_Allocated = .true.
integer, parameter, public failure
integer, parameter, public set
real(fp), parameter, public zero
integer, parameter, public fp
integer, parameter, public max_n_angles
real(fp), parameter, public angle_threshold
real(fp), parameter, public scattering_albedo_threshold
real(fp), parameter, public delta_optical_depth
real(fp), parameter, public optical_depth_threshold
character(*), parameter module_rcs_id
integer, parameter, public max_n_legendre_terms
integer, parameter, public max_n_soi_iterations
elemental subroutine, public rtv_create(RTV, n_Angles, n_Legendre_Terms, n_Layers)
real(fp), parameter, public secant_diffusivity
real(fp), parameter, public small_od_for_sc
real(fp), parameter, public one
recursive subroutine, public display_message(Routine_Name, Message, Error_State, Message_Log)
real(fp), parameter, public two
real(fp), parameter, public degrees_to_radians
integer, parameter, public invalid_sensor
integer, parameter, public max_n_layers
integer, parameter, public max_n_doubling
integer, parameter, public rt_ada
real(fp), parameter, public phase_threshold
real(fp), parameter, public max_albedo
elemental logical function, public rtv_associated(RTV)
integer, parameter, public success
elemental subroutine, public rtv_destroy(RTV)
real(fp), parameter, public pi