libsim  Versione6.3.0

◆ arrayof_ttr_mapper_insert_array()

subroutine arrayof_ttr_mapper_insert_array ( type(arrayof_ttr_mapper this,
type(ttr_mapper), dimension(:), intent(in), optional  content,
integer, intent(in), optional  nelem,
integer, intent(in), optional  pos 
)

Method for inserting a number of elements of the array at a desired position.

If necessary, the array is reallocated to accomodate the new elements.

Parametri
thisarray object to extend
[in]contentobject of TYPE TYPE(ttr_mapper) to insert, if not provided, space is reserved but not initialized
[in]nelemnumber of elements to add, mutually exclusive with the previous parameter, if both are not provided, a single element is added without initialization
[in]posposition where to insert, if it is out of range, it is clipped, if it is not provided, the object is appended

Definizione alla linea 516 del file stat_proc_engine.F90.

516  time_definition, pstart2, pend2, reftime2)
517  IF (lforecast) THEN
518  IF (reftime1 /= reftime2) cycle do_otime1
519  ENDIF
520 
521  IF (pstart1 >= pstart2 .AND. pend1 <= pend2 .AND. &
522  mod(pstart1-pstart2, pend1-pstart1) == timedelta_0) THEN ! useful
523  lmapper%it = k
524  lmapper%itr = l
525  lmapper%extra_info = steps/itimerange(l)%p2 ! dtratio, guaranteed to be integer
526  n = append(map_ttr(i,j), lmapper)
527  cycle do_itime1 ! can contribute only to a single interval
528  ENDIF
529  ENDDO do_otime1
530  ENDDO do_otimerange1
531  ENDDO do_itime1
532  ENDDO do_itimerange1
533 
534 ELSE
535 
536  ALLOCATE(map_ttr(SIZE(otime),SIZE(otimerange)))
537  do_itimerange2: DO l = 1, SIZE(itimerange)
538  IF (.NOT.mask_timerange(l)) cycle do_itimerange2
539  do_itime2: DO k = 1, SIZE(itime)
540  CALL time_timerange_get_period(itime(k), itimerange(l), &
541  time_definition, pstart1, pend1, reftime1)
542  do_otimerange2: DO j = 1, SIZE(otimerange)
543  do_otime2: DO i = 1, SIZE(otime)
544  CALL time_timerange_get_period_pop(otime(i), otimerange(j), step, &
545  time_definition, pstart2, pend2, reftime2)
546  IF (lforecast) THEN
547  IF (reftime1 /= reftime2) cycle do_otime2
548  ENDIF
549 
Operatore di resto della divisione.
Quick method to append an element to the array.

Generated with Doxygen.