libsim Versione 7.2.4

◆ arrayof_ttr_mapper_insert_array()

subroutine, private 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 )
private

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 490 del file stat_proc_engine.F90.

491
492#ifdef DEBUG
493CALL l4f_log(L4F_DEBUG, &
494 '(re)compute_stat_proc_agg, number of useful timeranges: '// &
495 t2c(count(mask_timerange)))
496#endif
497
498IF (SIZE(itime) == 0 .OR. count(mask_timerange) == 0) THEN ! avoid segmentation fault in case of empty volume
499 ALLOCATE(otime(0), otimerange(0), map_ttr(0,0))
500 IF (PRESENT(dtratio)) ALLOCATE(dtratio(0))
501 RETURN
502ENDIF
503
504! determine start and end of processing period, should work with p2==0
505lstart = datetime_miss
506IF (PRESENT(start)) lstart = start
507lend = itime(SIZE(itime))
508! compute some quantities
509maxp1 = maxval(itimerange(:)%p1, mask=mask_timerange)
510maxp2 = maxval(itimerange(:)%p2, mask=mask_timerange)
511minp1mp2 = minval(itimerange(:)%p1 - itimerange(:)%p2, mask=mask_timerange)
512IF (time_definition == 0) THEN ! reference time
513 lend = lend + timedelta_new(sec=maxp1)
514ENDIF
515! extend interval at the end in order to include all the data in case
516! frac_valid<1; must use < and not <= in the DO WHILE loops some lines
517! below in order to exclude the last full interval which would be empty
518lend = lend + step
519IF (lstart == datetime_miss) THEN ! autodetect
520 lstart = itime(1)
521! if autodetected, adjust to obtain real absolute start of data
522 IF (time_definition == 0) THEN ! reference time
523 lstart = lstart + timedelta_new(sec=minp1mp2)
524 ELSE ! verification time

Generated with Doxygen.