libsim  Versione 7.2.4

◆ arrayof_ttr_mapper_insert_array()

subroutine, private stat_proc_engine::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 500 del file stat_proc_engine.F90.

501  RETURN
502 ENDIF
503 
504 ! determine start and end of processing period, should work with p2==0
505 lstart = datetime_miss
506 IF (PRESENT(start)) lstart = start
507 lend = itime(SIZE(itime))
508 ! compute some quantities
509 maxp1 = maxval(itimerange(:)%p1, mask=mask_timerange)
510 maxp2 = maxval(itimerange(:)%p2, mask=mask_timerange)
511 minp1mp2 = minval(itimerange(:)%p1 - itimerange(:)%p2, mask=mask_timerange)
512 IF (time_definition == 0) THEN ! reference time
513  lend = lend + timedelta_new(sec=maxp1)
514 ENDIF
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
518 lend = lend + step
519 IF (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
525 ! go back to start of longest processing interval
526  lstart = lstart - timedelta_new(sec=maxp2)
527  ENDIF
528 ! apply full_steps in analysis mode and when start is not specified
529 ! (start by itself in analysis mode implies full_steps with respect to
530 ! start instead of absolute full steps), todo in forecast mode
531  IF (optio_log(full_steps) .AND. .NOT.lforecast) THEN
532  lstart = lstart - (mod(lstart, step)) ! round to step, (should be MODULO, not MOD)
533  ENDIF
534 ENDIF

Generated with Doxygen.