10 USE fckit_configuration_module,
ONLY: fckit_configuration
13 USE missing_values_mod
21 USE crtm_spccoeff,
ONLY: sc
24 USE cf_mieobs_mod,
ONLY: get_cf_aod
32 CHARACTER(len=maxvarlen),
PUBLIC,
ALLOCATABLE :: varin(:)
33 INTEGER,
ALLOCATABLE :: channels(:)
34 REAL(kind_real),
ALLOCATABLE :: wavelengths(:)
55 TYPE(fckit_configuration),
INTENT(in) :: f_confoper
56 INTEGER(c_int),
INTENT(in) :: channels(:)
58 INTEGER :: nvars_in, rc
59 CHARACTER(len=max_string) :: err_msg
60 TYPE(fckit_configuration) :: f_confopts
62 CHARACTER(len=maxvarlen),
ALLOCATABLE :: var_aerosols(:)
64 CALL f_confoper%get_or_die(
"obs options",f_confopts)
70 self%n_aerosols=
SIZE(var_aerosols)
73 ALLOCATE(self%varin(nvars_in))
77 ALLOCATE(self%channels(
SIZE(channels)))
78 ALLOCATE(self%wavelengths(
SIZE(channels)))
80 self%channels(:) = channels(:)
82 DEALLOCATE(var_aerosols)
95 IF (
ALLOCATED(self%varin))
DEALLOCATE(self%varin)
96 IF (
ALLOCATED(self%channels))
DEALLOCATE(self%channels)
97 IF (
ALLOCATED(self%wavelengths))
DEALLOCATE(self%wavelengths)
108 INTEGER,
INTENT(in) :: nvars, nlocs
109 REAL(c_double),
INTENT(inout) :: hofx(nvars, nlocs)
110 TYPE(c_ptr),
VALUE,
INTENT(in) :: obss
113 CHARACTER(*),
PARAMETER :: program_name =
'ufo_aodluts_mod.f90'
114 CHARACTER(255) :: message, version
115 INTEGER :: err_stat, alloc_stat
116 INTEGER :: l, m, n, i
118 REAL(c_double) :: missing
120 INTEGER :: n_profiles
122 INTEGER :: n_channels
123 INTEGER :: n_aerosols
126 TYPE(crtm_channelinfo_type) :: chinfo(self%conf%n_sensors)
128 REAL(kind_real),
ALLOCATABLE :: wavelengths_all(:)
129 REAL(kind_real),
ALLOCATABLE :: aero_layers(:,:,:),rh(:,:)
131 CHARACTER(len=maxvarlen),
ALLOCATABLE :: var_aerosols(:)
137 n_profiles = geovals%nlocs
142 n_aerosols=self%n_aerosols
144 ALLOCATE(aero_layers(n_aerosols,n_layers,n_profiles),&
145 &rh(n_layers,n_profiles))
147 err_stat = crtm_init( self%conf%sensor_id, &
149 file_path=trim(self%conf%coefficient_path), &
152 IF ( err_stat /= success )
THEN
153 message =
'error initializing crtm'
154 CALL display_message( program_name, message, failure )
158 sensor_loop:
DO n = 1, self%conf%n_sensors
160 n_channels = crtm_channelinfo_n_channels(chinfo(n))
162 IF (
ALLOCATED(wavelengths_all))
DEALLOCATE(wavelengths_all)
164 ALLOCATE(wavelengths_all(n_channels), stat = alloc_stat)
166 IF ( alloc_stat /= 0 )
THEN
167 message =
'error allocating wavelengths_all'
168 CALL display_message( program_name, message, failure )
172 wavelengths_all=1.e7/sc(chinfo(n)%sensor_index)%wavenumber(:)
174 self%wavelengths=wavelengths_all(self%channels)
177 &n_aerosols, n_profiles, n_layers,&
178 &geovals, aero_layers=aero_layers, rh=rh)
180 CALL get_cf_aod(n_layers, n_profiles, nvars, n_aerosols, &
182 &self%wavelengths, var_aerosols, aero_layers, rh, &
183 &aod_tot = hofx, rc = rc)
186 DEALLOCATE(aero_layers,rh,wavelengths_all)
189 message =
'error on exit from get_cf_aod'
190 CALL display_message( program_name, message, failure )
196 err_stat = crtm_destroy( chinfo )
197 IF ( err_stat /= success )
THEN
198 message =
'error destroying crtm (settraj)'
199 CALL display_message( program_name, message, failure )
fortran module to handle aod observations
character(maxvarlen), parameter varname_tmplate
subroutine ufo_aodluts_simobs(self, geovals, obss, nvars, nlocs, hofx)
subroutine ufo_aodluts_delete(self)
character(len=maxvarlen), dimension(4), parameter varin_default
subroutine ufo_aodluts_setup(self, f_confoper, channels)
Fortran module to provide code shared between nonlinear and tlm/adm radiance calculations.
integer, parameter, public max_string
subroutine, public assign_aerosol_names(aerosol_option, var_aerosols)
subroutine, public ufo_geovals_get_var(self, varname, geoval)
fortran module to provide code shared between nonlinear and tlm/adm radiance calculations
subroutine, public luts_conf_delete(conf)
subroutine, public calculate_aero_layers(aerosol_option, n_aerosols, n_profiles, n_layers, geovals, aero_layers, rh, layer_factors)
subroutine, public luts_conf_setup(conf, f_confopts, f_confoper)
character(len=maxvarlen), parameter, public var_prsi
character(len=maxvarlen), parameter, public var_prs
character(len=maxvarlen), parameter, public var_q
character(len=maxvarlen), parameter, public var_ts
fortran derived type for aod trajectory
type to hold interpolated field for one variable, one observation
type to hold interpolated fields required by the obs operators