20 USE def_control,
ONLY: strctrl
21 USE def_dimen,
ONLY: strdim
22 USE def_spectrum,
ONLY: strspecdata
23 USE ereport_mod,
ONLY: ereport
24 USE errormessagelength_mod,
ONLY: errormessagelength
31 TYPE(StrCtrl),
INTENT(IN) :: control
34 TYPE(StrDim),
INTENT(INOUT) :: dimen
37 TYPE (StrSpecData),
INTENT(IN) :: spectrum
39 INTEGER,
INTENT(IN) :: n_points
43 INTEGER,
INTENT(IN) :: model_levels
45 INTEGER,
INTENT(IN) :: cloud_levels
48 INTEGER :: ierr = i_normal
49 CHARACTER (LEN=*),
PARAMETER :: RoutineName =
'set_dimen'
50 CHARACTER (LEN=errormessagelength) :: cmessage
55 dimen%nd_profile = 2*(n_points/2)+1
56 dimen%nd_layer = model_levels
59 dimen%nd_cloud_type = 4
60 dimen%nd_cloud_component = 4
61 dimen%nd_cloud_representation = 4
62 SELECT CASE(control%i_cloud)
63 CASE (ip_cloud_column_max)
64 dimen%nd_column = 3 * cloud_levels + 2
68 dimen%nd_subcol_gen = 1
69 dimen%nd_subcol_req = 1
71 dimen%id_cloud_top = dimen%nd_layer + 1 - cloud_levels
72 IF (control%l_cloud)
THEN
73 dimen%nd_layer_clr = dimen%id_cloud_top - 1
75 dimen%nd_layer_clr = dimen%nd_layer
79 dimen%nd_aerosol_mode = 1
82 dimen%nd_profile_aerosol_prsc = 1
83 dimen%nd_profile_cloud_prsc = 1
84 dimen%nd_opt_level_aerosol_prsc = 1
85 dimen%nd_opt_level_cloud_prsc = 1
89 dimen%nd_point_tile = max(1,n_points)
94 IF (control%i_angular_integration == ip_two_stream)
THEN
96 dimen%nd_viewing_level = 1
97 dimen%nd_radiance_profile = 1
98 dimen%nd_j_profile = 1
99 dimen%nd_direction = 1
100 dimen%nd_brdf_basis_fnc = 2
101 dimen%nd_brdf_trunc = 1
102 dimen%nd_flux_profile = dimen%nd_profile
105 dimen%nd_2sg_profile = dimen%nd_profile
106 dimen%nd_source_coeff = 2
107 dimen%nd_max_order = 1
108 dimen%nd_sph_coeff = 1
110 SELECT CASE(control%i_solver)
112 CASE(ip_solver_mix_app_scat, ip_solver_mix_direct, ip_solver_mix_direct_hogan)
113 dimen%nd_overlap_coeff=8
116 CASE(ip_solver_triple_app_scat, ip_solver_triple, ip_solver_triple_hogan)
117 dimen%nd_overlap_coeff=18
121 dimen%nd_overlap_coeff=1
126 ELSE IF (control%i_angular_integration == ip_spherical_harmonic)
THEN
128 dimen%nd_direction = 1
129 dimen%nd_brdf_basis_fnc = 2
130 dimen%nd_radiance_profile = dimen%nd_profile
131 dimen%nd_j_profile = 1
133 IF (control%i_sph_mode == ip_sph_mode_flux)
THEN
134 dimen%nd_viewing_level = model_levels+1
135 dimen%nd_brdf_trunc = 1
136 dimen%nd_flux_profile = dimen%nd_profile
142 dimen%nd_viewing_level = 1
143 dimen%nd_brdf_trunc = 1
144 dimen%nd_flux_profile = 1
148 dimen%nd_channel = spectrum%basic%n_band
151 dimen%nd_2sg_profile = 1
152 dimen%nd_source_coeff = 1
153 dimen%nd_overlap_coeff = 1
155 dimen%nd_max_order = control%ls_global_trunc + 2
156 IF (control%i_truncation == ip_trunc_triangular)
THEN
157 dimen%nd_sph_coeff = &
158 (control%ls_global_trunc+3)*(control%ls_global_trunc+4)/2
159 ELSE IF (control%i_truncation == ip_trunc_azim_sym)
THEN
160 dimen%nd_sph_coeff = control%ls_global_trunc+2
162 cmessage =
'Illegal truncation'
172 IF (ierr /= i_normal)
THEN
173 CALL ereport(routinename, ierr, cmessage)