libsim  Versione 7.1.8

◆ vol7d_fill_time()

subroutine vol7d_class_compute::vol7d_fill_time ( type(vol7d), intent(inout)  this,
type(vol7d), intent(inout)  that,
type(timedelta), intent(in)  step,
type(datetime), intent(in), optional  start,
type(datetime), intent(in), optional  stopp,
type(cyclicdatetime), intent(in), optional  cyclicdt 
)

Riempimento dei buchi temporali in un volume.

Questo metodo crea, a partire da un volume originale, un nuovo volume dati in cui la dimensione tempo contiene tutti gli istanti tra start e stopp (o tra il primo e l'ultimo livello temporale) ad intervalli step. Gli eventuali livelli mancanti vengono aggiunti riempiendo le corrispondenti posizioni dei volumi dati con valori mancanti. I livelli temporali che non sono ad intervalli step interi a partire dall'inizio, oppure quelli che giacciono fuori dall'intervallo start:stop non vengono toccati e quindi rimangono immutati nel volume finale (si veda anche la descrizione di vol7d_filter_time). Il volume originale non viene modificato e quindi dovrà essere distrutto da parte del programma chiamante se il suo contenuto non è più richiesto. Attenzione, se necessario la dimensione tempo (vettore thistime del volume this ) viene riordinata, come effetto collaterale della chiamata.

Parametri
[in]cyclicdtcyclic date and time

Definizione alla linea 1469 del file vol7d_class_compute.F90.

1470  this%voldatir(indana, indtime, indlevel, indtimerange, inddativarr, indnetwork) = &
1471  this%voldatir(indana, iindtime, indlevel, indtimerange, inddativarr, indnetwork)
1472  deltato=deltat
1473  end if
1474  end if
1475  end do
1476 
1477  do iindtime=indtime-1,1,-1 !check backward
1478 
1479  if (c_e(this%voldatir (indana, iindtime, indlevel, indtimerange, inddativarr, indnetwork )))then
1480  if (iindtime < indtime) then
1481  deltat=this%time(indtime)-this%time(iindtime)
1482  else if (iindtime > indtime) then
1483  deltat=this%time(iindtime)-this%time(indtime)
1484  else
1485  cycle
1486  end if
1487 
1488  if (deltat >= ltolerance) exit
1489 
1490  if (deltat < deltato) then
1491  this%voldatir(indana, indtime, indlevel, indtimerange, inddativarr, indnetwork) = &
1492  this%voldatir(indana, iindtime, indlevel, indtimerange, inddativarr, indnetwork)
1493  deltato=deltat
1494  end if
1495  end if
1496  end do
1497 
1498  end if
1499  end do
1500  end do
1501  end do
1502  end do
1503  end do
1504 end do
1505 
1506 END SUBROUTINE vol7d_fill_data
1507 
1508 
1509 ! private utility routine for checking interval and start-stop times
1510 ! in input missing start-stop values are treated as not present
1511 ! in output missing start-stop values mean "do nothing"
1512 SUBROUTINE safe_start_stop(this, lstart, lstop, start, stopp)
1513 TYPE(vol7d),INTENT(inout) :: this
1514 TYPE(datetime),INTENT(out) :: lstart
1515 TYPE(datetime),INTENT(out) :: lstop
1516 TYPE(datetime),INTENT(in),OPTIONAL :: start
1517 TYPE(datetime),INTENT(in),OPTIONAL :: stopp
1518 
1519 lstart = datetime_miss
1520 lstop = datetime_miss
1521 ! initial safety operation
1522 CALL vol7d_alloc_vol(this)
1523 IF (SIZE(this%time) == 0) RETURN ! avoid segmentation fault in case of empty volume
1524 CALL vol7d_smart_sort(this, lsort_time=.TRUE.)
1525 
1526 IF (PRESENT(start)) THEN
1527  IF (c_e(start)) THEN
1528  lstart = start
1529  ELSE
1530  lstart = this%time(1)
1531  ENDIF
1532 ELSE
1533  lstart = this%time(1)
1534 ENDIF
1535 IF (PRESENT(stopp)) THEN
1536  IF (c_e(stopp)) THEN
1537  lstop = stopp
1538  ELSE
1539  lstop = this%time(SIZE(this%time))
1540  ENDIF
1541 ELSE
1542  lstop = this%time(SIZE(this%time))
1543 ENDIF
1544 
1545 END SUBROUTINE safe_start_stop
1546 
1547 
1554 SUBROUTINE vol7d_normalize_vcoord(this,that,ana,time,timerange,network)
1555 TYPE(vol7d),INTENT(INOUT) :: this
1556 TYPE(vol7d),INTENT(OUT) :: that

Generated with Doxygen.