157 SUBROUTINE mse_dot_read(mse_file, signals, signals_created, &
158 & observed, sigma, weight, first_index)
165 CHARACTER (len=path_length),
INTENT(in) :: mse_file
166 TYPE (signal_pointer),
DIMENSION(:),
INTENT(inout) :: signals
167 INTEGER,
INTENT(inout) :: signals_created
168 REAL (rprec),
DIMENSION(:),
INTENT(in) :: observed
169 REAL (rprec),
DIMENSION(:),
INTENT(in) :: sigma
170 REAL (rprec),
DIMENSION(:),
INTENT(in) :: weight
171 INTEGER,
INTENT(inout) :: first_index
175 INTEGER,
PARAMETER :: n_mse_keyword = 19
179 CHARACTER(len=data_name_length),
DIMENSION(1:n_mse_keyword) :: &
181 TYPE (signal_dot_file) :: mse_dot_file_ref
182 REAL (rprec) :: start_time
185 start_time = profiler_get_start_time()
188 mse_keyword(1) =
'mse_point_XYZ_deg'
189 mse_keyword(2) =
'mse_point_RPhiDegZ_deg'
190 mse_keyword(3) =
'mse_point_XYZ_rad'
191 mse_keyword(4) =
'mse_point_RPhiDegZ_rad'
192 mse_keyword(5) =
'mse_point_XYZ_deg_deg'
193 mse_keyword(6) =
'mse_point_RPhiDegZ_deg_deg'
194 mse_keyword(7) =
'mse_point_XYZ_rad_deg'
195 mse_keyword(8) =
'mse_point_RPhiDegZ_rad_deg'
196 mse_keyword(9) =
'mse_point_XYZ_deg_rad'
197 mse_keyword(10) =
'mse_point_RPhiDegZ_deg_rad'
198 mse_keyword(11) =
'mse_point_XYZ_rad_rad'
199 mse_keyword(12) =
'mse_point_RPhiDegZ_rad_rad'
200 mse_keyword(13) =
'mse_point_XYZ_ratio'
201 mse_keyword(14) =
'mse_point_RPhiDegZ_ratio'
202 mse_keyword(15) =
'mse_point_XYZ_deg_ratio'
203 mse_keyword(16) =
'mse_point_RPhiDegZ_deg_ratio'
204 mse_keyword(17) =
'mse_point_XYZ_rad_ratio'
205 mse_keyword(18) =
'mse_point_RPhiDegZ_rad_ratio'
206 mse_keyword(19) =
'end_of_file'
224 CASE (
'mse_point_XYZ_deg')
226 & signals_created, observed, sigma, &
227 & weight, first_index, .true., &
230 CASE (
'mse_point_RPhiDegZ_deg')
232 & signals, signals_created, &
233 & observed, sigma, weight, &
234 & first_index, .true., .false.)
236 CASE (
'mse_point_XYZ_rad')
238 & signals_created, observed, sigma, &
239 & weight, first_index, .false., &
242 CASE (
'mse_point_RPhiDegZ_rad')
244 & signals, signals_created, &
245 & observed, sigma, weight, &
246 & first_index, .false., .false.)
248 CASE (
'mse_point_XYZ_deg_deg')
250 & signals_created, observed, sigma, &
251 & weight, first_index, .true., &
254 CASE (
'mse_point_RPhiDegZ_deg_deg')
256 & signals, signals_created, &
257 & observed, sigma, weight, &
258 & first_index, .true., .true., &
261 CASE (
'mse_point_XYZ_rad_deg')
263 & signals_created, observed, sigma, &
264 & weight, first_index, .false., &
267 CASE (
'mse_point_RPhiDegZ_rad_deg')
269 & signals, signals_created, &
270 & observed, sigma, weight, &
271 & first_index, .false., .true., &
274 CASE (
'mse_point_XYZ_deg_rad')
276 & signals_created, observed, sigma, &
277 & weight, first_index, .true., &
280 CASE (
'mse_point_RPhiDegZ_deg_rad')
282 & signals, signals_created, &
283 & observed, sigma, weight, &
284 & first_index, .true., .false., &
287 CASE (
'mse_point_XYZ_rad_rad')
289 & signals_created, observed, sigma, &
290 & weight, first_index, .false., &
293 CASE (
'mse_point_RPhiDegZ_rad_rad')
295 & signals, signals_created, &
296 & observed, sigma, weight, &
297 & first_index, .false., .false., &
300 CASE (
'mse_point_XYZ_ratio')
302 & signals_created, observed, sigma, &
303 & weight, first_index, .true., &
306 CASE (
'mse_point_RPhiDegZ_ratio')
308 & signals, signals_created, &
309 & observed, sigma, weight, &
310 & first_index, .true., .true.)
312 CASE (
'mse_point_XYZ_deg_ratio')
314 & signals_created, observed, sigma, &
315 & weight, first_index, .true., &
318 CASE (
'mse_point_RPhiDegZ_deg_ratio')
320 & signals, signals_created, &
321 & observed, sigma, weight, &
322 & first_index, .true., .true., &
325 CASE (
'mse_point_XYZ_rad_ratio')
327 & signals_created, observed, sigma, &
328 & weight, first_index, .false., &
331 CASE (
'mse_point_RPhiDegZ_rad_ratio')
333 & signals, signals_created, &
334 & observed, sigma, weight, &
335 & first_index, .false., .true., &
345 CALL profiler_set_stop_time(
'mse_dot_read', start_time)
379 & signals, signals_created, &
380 & observed, sigma, weight, &
381 & first_index, in_degrees, is_ratio)
386 USE v3_utilities,
only: err_fatal
392 TYPE (signal_dot_file),
INTENT(inout) :: mse_dot_file_ref
393 CHARACTER (len=*),
INTENT(in) :: coordinate_type
394 TYPE (signal_pointer),
DIMENSION(:),
INTENT(inout) :: signals
395 INTEGER,
INTENT(inout) :: signals_created
396 REAL (rprec),
DIMENSION(:),
INTENT(in) :: observed
397 REAL (rprec),
DIMENSION(:),
INTENT(in) :: sigma
398 REAL (rprec),
DIMENSION(:),
INTENT(in) :: weight
399 INTEGER,
INTENT(inout) :: first_index
400 LOGICAL,
INTENT(in) :: in_degrees
401 LOGICAL,
INTENT(in) :: is_ratio
405 REAL (rprec),
DIMENSION(3) :: xcart
406 REAL (rprec),
DIMENSION(3) :: view_start
407 REAL (rprec),
DIMENSION(3) :: view_end
408 REAL (rprec),
DIMENSION(3) :: beam_start
409 REAL (rprec),
DIMENSION(3) :: beam_end
410 CHARACTER (len=data_short_name_length) :: point_name
411 CHARACTER (len=signal_dot_line_len) :: line
412 REAL (rprec) :: start_time
415 start_time = profiler_get_start_time()
423 &
'Failed to parse view ' // &
426 &
'Failed to parse view ' // &
431 &
'Failed to parse beam ' // &
434 &
'Failed to parse beam ' // &
438 IF (trim(coordinate_type) .eq.
'RPhiDegZ')
THEN
439 view_start(2) = view_start(2)*degree
441 view_end(2) = view_end(2)*degree
444 beam_start(2) = beam_start(2)*degree
446 beam_end(2) = beam_end(2)*degree
450 mse_obj =>
mse_class(xcart, view_start, view_end, beam_start, &
451 & beam_end, in_degrees, is_ratio)
453 CALL signal_construct(mse_obj, point_name, point_name,
'arb', & &
454 & observed(signals_created + 1), sigma(signals_created + 1), &
455 & weight(signals_created + 1), &
459 signals(signals_created + 1)%p => mse_obj
461 signals_created = signals_created + 1
465 IF (first_index .eq. -1)
THEN
466 first_index = signals_created
469 CALL profiler_set_stop_time(
'mse_dot_parse_vec', start_time)
499 & signals, signals_created, &
500 & observed, sigma, weight, &
501 & first_index, in_degrees1, &
502 & in_degrees2, is_ratio)
507 USE v3_utilities,
only: err_fatal
513 TYPE (signal_dot_file),
INTENT(inout) :: mse_dot_file_ref
514 CHARACTER (len=*),
INTENT(in) :: coordinate_type
515 TYPE (signal_pointer),
DIMENSION(:),
INTENT(inout) :: signals
516 INTEGER,
INTENT(inout) :: signals_created
517 REAL (rprec),
DIMENSION(:),
INTENT(in) :: observed
518 REAL (rprec),
DIMENSION(:),
INTENT(in) :: sigma
519 REAL (rprec),
DIMENSION(:),
INTENT(in) :: weight
520 INTEGER,
INTENT(inout) :: first_index
521 LOGICAL,
INTENT(in) :: in_degrees1
522 LOGICAL,
INTENT(in) :: in_degrees2
523 LOGICAL,
INTENT(in) :: is_ratio
527 REAL (rprec),
DIMENSION(3) :: xcart
528 REAL (rprec),
DIMENSION(2) :: t_angles
529 REAL (rprec),
DIMENSION(2) :: h_angles
530 CHARACTER (len=data_short_name_length) :: point_name
531 CHARACTER (len=signal_dot_line_len) :: line
532 REAL (rprec) :: start_time
535 start_time = profiler_get_start_time()
543 &
'Failed to parse angles ' // &
548 &
'Failed to parse angles ' // &
552 IF (in_degrees1)
THEN
553 t_angles = t_angles*degree
554 h_angles = h_angles*degree
557 mse_obj =>
mse_class(xcart, t_angles(1), t_angles(2), h_angles(1), &
558 & h_angles(2), in_degrees2, is_ratio)
560 CALL signal_construct(mse_obj, point_name, point_name,
'arb', &
561 & observed(signals_created + 1), &
562 & sigma(signals_created + 1), weight(signals_created + 1), &
566 signals(signals_created + 1)%p => mse_obj
568 signals_created = signals_created + 1
572 IF (first_index .eq. -1)
THEN
573 first_index = signals_created
576 CALL profiler_set_stop_time(
'mse_dot_parse_ang', start_time)