10 use ai_optics,
only : optics_t
11 use ai_optics_absorption_optical_depth, &
12 only : optics_absorption_optical_depth_t
13 use ai_optics_asymmetry_factor,
only : optics_asymmetry_factor_t
14 use ai_optics_extinction_optical_depth, &
15 only : optics_extinction_optical_depth_t
16 use ai_optics_forward_scattered_fraction, &
17 only : optics_forward_scattered_fraction_t
18 use ai_optics_single_scatter_albedo, &
19 only : optics_single_scatter_albedo_t
20 use musica_constants,
only : musica_dk
33 native_longwave_grid, output_grid, interpolation_strategy ) &
36 use ai_wavelength_grid,
only : wavelength_grid_t, kwavenumber, &
38 use musica_assert,
only : die_msg
39 use musica_interpolator,
only : interpolation_strategy_i
40 use musica_property,
only : property_t
41 use musica_string,
only : string_t
43 class(optics_t),
pointer :: new_optics
44 class(property_t),
intent(in) :: property
45 type(wavelength_grid_t),
intent(in) :: native_shortwave_grid
46 type(wavelength_grid_t),
intent(in) :: native_longwave_grid
47 type(wavelength_grid_t),
intent(in) :: output_grid
48 procedure(interpolation_strategy_i),
optional :: interpolation_strategy
50 type(wavelength_grid_t) :: native_grid
51 type(string_t) :: property_name
53 property_name = property%name( )
54 if( property_name .eq.
"layer extinction optical depth" )
then
55 new_optics => optics_extinction_optical_depth_t( native_shortwave_grid, &
57 interpolation_strategy = interpolation_strategy )
58 else if( property_name .eq.
"layer single-scatter albedo" )
then
59 new_optics => optics_single_scatter_albedo_t( native_shortwave_grid, &
61 interpolation_strategy = interpolation_strategy )
62 else if( property_name .eq.
"asymmetry factor" )
then
63 new_optics => optics_asymmetry_factor_t( native_shortwave_grid, &
65 interpolation_strategy = interpolation_strategy )
66 else if( property_name .eq.
"forward scattered fraction" )
then
67 new_optics => optics_forward_scattered_fraction_t( &
68 native_shortwave_grid, &
70 interpolation_strategy = interpolation_strategy )
71 else if( property_name .eq.
"layer absorption optical depth" )
then
72 new_optics => optics_absorption_optical_depth_t( native_longwave_grid, &
74 interpolation_strategy = interpolation_strategy )
76 call die_msg( 769442313,
"Unsupported optical property: '"// &
86 extinction_optical_depth, single_scatter_albedo, asymmetry_factor, &
89 real(kind=musica_dk),
intent(in) :: extinction_optical_depth(:)
90 real(kind=musica_dk),
intent(in) :: single_scatter_albedo(:)
92 class(optics_extinction_optical_depth_t),
intent(inout) :: optics
94 call optics%add_values( extinction_optical_depth )
102 extinction_optical_depth, single_scatter_albedo, asymmetry_factor, &
105 real(kind=musica_dk),
intent(in) :: extinction_optical_depth(:)
106 real(kind=musica_dk),
intent(in) :: single_scatter_albedo(:)
108 class(optics_single_scatter_albedo_t),
intent(inout) :: optics
113 call optics%add_values( extinction_optical_depth(:) &
114 * single_scatter_albedo(:) )
122 extinction_optical_depth, single_scatter_albedo, asymmetry_factor, &
125 real(kind=musica_dk),
intent(in) :: extinction_optical_depth(:)
126 real(kind=musica_dk),
intent(in) :: single_scatter_albedo(:)
128 class(optics_asymmetry_factor_t),
intent(inout) :: optics
134 call optics%add_values( extinction_optical_depth(:) &
135 * single_scatter_albedo(:) &
144 extinction_optical_depth, single_scatter_albedo, asymmetry_factor, &
147 real(kind=musica_dk),
intent(in) :: extinction_optical_depth(:)
148 real(kind=musica_dk),
intent(in) :: single_scatter_albedo(:)
150 class(optics_forward_scattered_fraction_t),
intent(inout) :: optics
152 call optics%add_values( extinction_optical_depth(:) &
153 * single_scatter_albedo(:) &
163 extinction_optical_depth, single_scatter_albedo, asymmetry_factor, &
166 use musica_assert,
only : die_msg
168 real(kind=musica_dk),
intent(in) :: extinction_optical_depth(:)
169 real(kind=musica_dk),
intent(in) :: single_scatter_albedo(:)
171 class(optics_t),
intent(inout) :: optics
173 select type( optics )
174 class is( optics_extinction_optical_depth_t )
178 class is( optics_single_scatter_albedo_t )
182 class is( optics_asymmetry_factor_t )
186 class is( optics_forward_scattered_fraction_t )
191 call die_msg( 628273876,
"Unsupported MAM shortwave optical property" )
200 extinction_optical_depth, optics )
202 real(kind=musica_dk),
intent(in) :: extinction_optical_depth(:)
203 class(optics_absorption_optical_depth_t),
intent(inout) :: optics
205 call optics%add_values( extinction_optical_depth )
214 use musica_assert,
only : die_msg
216 real(kind=musica_dk),
intent(in) :: extinction_optical_depth(:)
217 class(optics_t),
intent(inout) :: optics
219 select type( optics )
220 class is( optics_absorption_optical_depth_t )
224 call die_msg(405116022,
"Unsupported MAM longwave optical property" )
Constants used to calculate MAM optical properties.
subroutine add_shortwave_asymmetry_factor(extinction_optical_depth, single_scatter_albedo, asymmetry_factor, optics)
Adds asymmetry factor to optical property values.
subroutine add_shortwave_extinction_optical_depth(extinction_optical_depth, single_scatter_albedo, asymmetry_factor, optics)
Adds extinction optical depths to optical property values.
subroutine add_longwave_absorption_optical_depth(extinction_optical_depth, optics)
Adds absorption optical depth to optical property values.
subroutine add_shortwave_forward_scattered_fraction(extinction_optical_depth, single_scatter_albedo, asymmetry_factor, optics)
Adds forward scattered fraction to optical property values.
subroutine add_shortwave_single_scatter_albedo(extinction_optical_depth, single_scatter_albedo, asymmetry_factor, optics)
Adds single-scatter albedo to optical property values.
class(optics_t) function, pointer, public create_optics(property, native_shortwave_grid, native_longwave_grid, output_grid, interpolation_strategy)
Returns an optics_t object for a given property.
subroutine, public add_shortwave_property(extinction_optical_depth, single_scatter_albedo, asymmetry_factor, optics)
Adds to shortwave property values.
subroutine, public add_longwave_property(extinction_optical_depth, optics)
Adds to longwave property values.
real(kind=musica_dk), dimension(:,:), intent(out), optional asymmetry_factor