libsim  Versione6.3.0

◆ 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
thisarray object to extend
[in]contentobject of TYPE TYPE(ttr_mapper) to insert
[in]incrinsert in increasing order
[in]backsearch position starting from end of array (optimization)

Definizione alla linea 628 del file stat_proc_engine.F90.

628  CALL getval(nexthalf - half, amsec=dt)
629  weights(i) = dble(dt)/dble(tdt)
630  half = nexthalf
631  ENDDO
632  CALL getval(pend - half, amsec=dt)
633  weights(nt) = dble(dt)/dble(tdt)
634  ENDIF
635 ENDIF
636 
637 END SUBROUTINE compute_stat_proc_agg_sw
638 
639 ! get start of period, end of period and reference time from time,
640 ! timerange, according to time_definition.
641 SUBROUTINE time_timerange_get_period(time, timerange, time_definition, &
642  pstart, pend, reftime)
643 TYPE(datetime),INTENT(in) :: time
644 TYPE(vol7d_timerange),INTENT(in) :: timerange
645 INTEGER,INTENT(in) :: time_definition
646 TYPE(datetime),INTENT(out) :: reftime
647 TYPE(datetime),INTENT(out) :: pstart
648 TYPE(datetime),INTENT(out) :: pend
649 
650 TYPE(timedelta) :: p1, p2
651 
652 
653 p1 = timedelta_new(sec=timerange%p1) ! end of period
654 p2 = timedelta_new(sec=timerange%p2) ! length of period
655 
656 IF (time == datetime_miss .OR. .NOT.c_e(timerange%p1) .OR. .NOT.c_e(timerange%p2) .OR. &
657 ! (timerange%p1 > 0 .AND. timerange%p1 < timerange%p2) .OR. &
658  timerange%p1 < 0 .OR. timerange%p2 < 0) THEN ! is this too pedantic and slow?
Restituiscono il valore dell&#39;oggetto nella forma desiderata.

Generated with Doxygen.