129 SUBROUTINE ipch_dot_read(ipch_file, signals, signals_created, &
130 & observed, sigma, weight, first_index, &
138 CHARACTER (len=path_length),
INTENT(in) :: ipch_file
139 TYPE (signal_pointer),
DIMENSION(:),
INTENT(inout) :: signals
140 INTEGER,
INTENT(inout) :: signals_created
141 REAL (rprec),
DIMENSION(:),
INTENT(in) :: observed
142 REAL (rprec),
DIMENSION(:),
INTENT(in) :: sigma
143 REAL (rprec),
DIMENSION(:),
INTENT(in) :: weight
144 INTEGER,
INTENT(inout) :: first_index
145 LOGICAL,
INTENT(out) :: use_polarimetry
149 INTEGER,
PARAMETER :: n_ipchd_keyword = 9
153 CHARACTER(len=data_name_length),
DIMENSION(1:n_ipchd_keyword) :: &
155 TYPE(signal_dot_file) :: ipch_dot_file_ref
156 REAL (rprec) :: start_time
159 start_time = profiler_get_start_time()
162 ipchd_keyword(1) =
'ip_chord_XYZ'
163 ipchd_keyword(2) =
'ip_chord_RPhiDegZ'
164 ipchd_keyword(3) =
'ip_chord_XYZ_int'
165 ipchd_keyword(4) =
'ip_chord_RPhiDegZ_int'
166 ipchd_keyword(5) =
'ip_chord_XYZ_pol_rad'
167 ipchd_keyword(6) =
'ip_chord_RPhiDegZ_pol_rad'
168 ipchd_keyword(7) =
'ip_chord_XYZ_pol_deg'
169 ipchd_keyword(8) =
'ip_chord_RPhiDegZ_pol_deg'
170 ipchd_keyword(9) =
'end_of_file'
175 use_polarimetry = .false.
190 CASE (
'ip_chord_XYZ',
'ip_chord_XYZ_int')
192 &
'XYZ',
'i', .false., &
193 & signals, signals_created, &
194 & observed, sigma, weight, &
198 CASE (
'ip_chord_RPhiDegZ',
'ip_chord_RPhiDegZ_int')
200 &
'RPHiDegZ',
'i', .false., &
201 & signals, signals_created, &
202 & observed, sigma, weight, &
206 CASE (
'ip_chord_XYZ_pol_rad')
208 &
'XYZ',
'p', .false., &
209 & signals, signals_created, &
210 & observed, sigma, weight, &
212 use_polarimetry = .true.
215 CASE (
'ip_chord_RPhiDegZ_pol_rad')
217 &
'RPHiDegZ',
'p', .false., &
218 & signals, signals_created, &
219 & observed, sigma, weight, &
221 use_polarimetry = .true.
224 CASE (
'ip_chord_XYZ_pol_deg')
226 &
'XYZ',
'p', .true., &
227 & signals, signals_created, &
228 & observed, sigma, weight, &
230 use_polarimetry = .true.
233 CASE (
'ip_chord_RPhiDegZ_pol_deg')
235 &
'RPHiDegZ',
'p', .true., &
236 & signals, signals_created, &
237 & observed, sigma, weight, &
239 use_polarimetry = .true.
249 CALL profiler_set_stop_time(
'ipch_dot_read', start_time)
290 & observed, sigma, weight, &
296 USE v3_utilities,
only: err_fatal
301 TYPE (signal_dot_file),
INTENT(inout) :: ipch_dot_file_ref
302 CHARACTER (len=*),
INTENT(in) :: coordinate_type
303 CHARACTER (len=1),
INTENT(in) :: chord_type
304 LOGICAL,
INTENT(in) :: inDegrees
305 TYPE (signal_pointer),
DIMENSION(:),
INTENT(inout) :: signals
306 INTEGER,
INTENT(inout) :: signals_created
307 REAL (rprec),
DIMENSION(:),
INTENT(in) :: observed
308 REAL (rprec),
DIMENSION(:),
INTENT(in) :: sigma
309 REAL (rprec),
DIMENSION(:),
INTENT(in) :: weight
310 INTEGER,
INTENT(inout) :: first_index
313 REAL (rprec),
DIMENSION(2,3) :: xcart
314 CHARACTER (len=data_name_length) :: chord_name
315 REAL (rprec) :: wavelength = 0.0
316 REAL (rprec) :: start_time
317 CHARACTER (len=6) :: units
321 start_time = profiler_get_start_time()
325 CALL err_fatal(
'ipch_dot_parse_chord_new: created signals' // &
326 &
' exceeds v3fit_max_diagnostics')
333 & xcart(1,:), xcart(2,:))
335 IF (chord_type .eq.
'p')
THEN
337 &
'Expected wavelength for polarimetry chord')
346 CALL signal_construct(intpol_obj, chord_name, chord_name, &
347 & units, observed(signals_created + 1), &
348 & sigma(signals_created + 1), &
349 & weight(signals_created + 1), &
353 signals(signals_created + 1)%p => intpol_obj
356 CALL signal_construct(intpol_obj, chord_name, chord_name, &
357 &
'm^-2', observed(signals_created + 1), &
358 & sigma(signals_created + 1), &
359 & weight(signals_created + 1), &
363 signals(signals_created + 1)%p => intpol_obj
366 signals_created = signals_created + 1
370 IF (first_index .eq. -1)
THEN
371 first_index = signals_created
374 CALL profiler_set_stop_time(
'ipch_dot_parse_chord', start_time)