|
◆ arrayof_ttr_mapper_insert_sorted()
integer function, private stat_proc_engine::arrayof_ttr_mapper_insert_sorted |
( |
type(arrayof_ttr_mapper) |
this, |
|
|
type(ttr_mapper), intent(in) |
content, |
|
|
logical, intent(in) |
incr, |
|
|
logical, intent(in) |
back |
|
) |
| |
|
private |
Method for inserting an element of the array in a sorted manner.
If necessary, the array is reallocated to accomodate the new element. It works under the assumption that the current content of the array is already sorted in the desired order. - Parametri
-
| this | array object to extend |
[in] | content | object of TYPE TYPE(ttr_mapper) to insert |
[in] | incr | insert in increasing order |
[in] | back | search position starting from end of array (optimization) |
Definizione alla linea 612 del file stat_proc_engine.F90.
613 do_itime1: DO k = 1, SIZE(itime)
614 CALL time_timerange_get_period(itime(k), itimerange(l), &
615 time_definition, pstart1, pend1, reftime1)
616 do_otimerange1: DO j = 1, SIZE(otimerange)
617 do_otime1: DO i = 1, SIZE(otime)
618 CALL time_timerange_get_period_pop(otime(i), otimerange(j), step, &
619 time_definition, pstart2, pend2, reftime2)
621 IF (reftime1 /= reftime2) cycle do_otime1
624 IF (pstart1 >= pstart2 .AND. pend1 <= pend2 .AND. &
625 mod(pstart1-pstart2, pend1-pstart1) == timedelta_0) THEN
628 lmapper%extra_info = steps/itimerange(l)%p2
629 n = append(map_ttr(i,j), lmapper)
639 ALLOCATE(map_ttr( SIZE(otime), SIZE(otimerange)))
640 do_itimerange2: DO l = 1, SIZE(itimerange)
641 IF (.NOT.mask_timerange(l)) cycle do_itimerange2
642 do_itime2: DO k = 1, SIZE(itime)
643 CALL time_timerange_get_period(itime(k), itimerange(l), &
|