libsim  Versione6.3.0

◆ vol7d_set_attr_ind()

subroutine vol7d_class::vol7d_set_attr_ind ( type(vol7d), intent(inout)  this)

Metodo per creare gli indici che associano le variabili aventi attributo alle variabili nei relativi descrittori.

Ha senso chiamare questo metodo solo dopo che i descrittori delle variabili e degli attributi desiderati sono stati allocati ed รจ stato assegnato un valore ai relativi membri btable (vedi vol7d_var_class::vol7d_var), se i descrittori non sono stati allocati o assegnati, il metodo non fa niente.

Parametri
[in,out]thisoggetto in cui creare gli indici

Definizione alla linea 1535 del file vol7d_class.F90.

1535 
1536 TYPE(vol7d) :: v7d_clean
1537 
1538 
1539 IF (.NOT.c_e(this)) THEN ! speedup
1540  this = that
1541  CALL init(v7d_clean)
1542  that = v7d_clean ! destroy that without deallocating
1543 ELSE ! Append that to this and destroy that
1544  CALL vol7d_append(this, that, sort, bestdata, &
1545  ltimesimple, ltimerangesimple, llevelsimple, lanasimple)
1546  CALL delete(that)
1547 ENDIF
1548 
1549 END SUBROUTINE vol7d_merge
1550 
1551 
1580 SUBROUTINE vol7d_append(this, that, sort, bestdata, &
1581  ltimesimple, ltimerangesimple, llevelsimple, lanasimple, lnetworksimple)
1582 TYPE(vol7d),INTENT(INOUT) :: this
1583 TYPE(vol7d),INTENT(IN) :: that
1584 LOGICAL,INTENT(IN),OPTIONAL :: sort
1585 ! experimental, please do not use outside the library now, they force the use
1586 ! of a simplified mapping algorithm which is valid only whene the dimension
1587 ! content is the same in both volumes , or when one of them is empty
1588 LOGICAL,INTENT(in),OPTIONAL :: bestdata
1589 LOGICAL,INTENT(IN),OPTIONAL :: ltimesimple, ltimerangesimple, llevelsimple, lanasimple, lnetworksimple
1590 
1591 
1592 TYPE(vol7d) :: v7dtmp
1593 LOGICAL :: lsort, lbestdata
1594 INTEGER,POINTER :: remapt1(:), remapt2(:), remaptr1(:), remaptr2(:), &
1595  remapl1(:), remapl2(:), remapa1(:), remapa2(:), remapn1(:), remapn2(:)
1596 
1597 IF (.NOT.c_e(that)) RETURN ! speedup, nothing to do
1598 IF (.NOT.vol7d_check_vol(that)) RETURN ! be safe
1599 IF (.NOT.c_e(this)) THEN ! this case is like a vol7d_copy, more efficient to copy?
1600  CALL vol7d_copy(that, this, sort=sort)
1601  RETURN
1602 ENDIF
1603 
1604 IF (this%time_definition /= that%time_definition) THEN
1605  CALL l4f_log(l4f_fatal, &
1606  'in vol7d_append, cannot append volumes with different &
1607  &time definition')
1608  CALL raise_fatal_error()
1609 ENDIF
1610 
1611 ! Completo l'allocazione per avere volumi a norma
1612 CALL vol7d_alloc_vol(this)
1613 
1614 CALL init(v7dtmp, time_definition=this%time_definition)
1615 CALL optio(sort, lsort)
1616 CALL optio(bestdata, lbestdata)
1617 
1618 ! Calcolo le mappature tra volumi vecchi e volume nuovo
1619 ! I puntatori remap* vengono tutti o allocati o nullificati
1620 IF (optio_log(ltimesimple)) THEN
1621  CALL vol7d_remap2simple_datetime(this%time, that%time, v7dtmp%time, &
1622  lsort, remapt1, remapt2)
1623 ELSE
1624  CALL vol7d_remap2_datetime(this%time, that%time, v7dtmp%time, &
1625  lsort, remapt1, remapt2)
1626 ENDIF
1627 IF (optio_log(ltimerangesimple)) THEN
1628  CALL vol7d_remap2simple_vol7d_timerange(this%timerange, that%timerange, &
1629  v7dtmp%timerange, lsort, remaptr1, remaptr2)
1630 ELSE
1631  CALL vol7d_remap2_vol7d_timerange(this%timerange, that%timerange, &
1632  v7dtmp%timerange, lsort, remaptr1, remaptr2)
1633 ENDIF
1634 IF (optio_log(llevelsimple)) THEN
1635  CALL vol7d_remap2simple_vol7d_level(this%level, that%level, v7dtmp%level, &
1636  lsort, remapl1, remapl2)
1637 ELSE
1638  CALL vol7d_remap2_vol7d_level(this%level, that%level, v7dtmp%level, &
1639  lsort, remapl1, remapl2)
1640 ENDIF
1641 IF (optio_log(lanasimple)) THEN
1642  CALL vol7d_remap2simple_vol7d_ana(this%ana, that%ana, v7dtmp%ana, &
1643  .false., remapa1, remapa2)
1644 ELSE
1645  CALL vol7d_remap2_vol7d_ana(this%ana, that%ana, v7dtmp%ana, &
1646  .false., remapa1, remapa2)
1647 ENDIF
1648 IF (optio_log(lnetworksimple)) THEN
1649  CALL vol7d_remap2simple_vol7d_network(this%network, that%network, v7dtmp%network, &
1650  .false., remapn1, remapn2)
1651 ELSE
1652  CALL vol7d_remap2_vol7d_network(this%network, that%network, v7dtmp%network, &
1653  .false., remapn1, remapn2)
1654 ENDIF
1655 
1656 ! Faccio la fusione fisica dei volumi
1657 CALL vol7d_merge_finalr(this, that, v7dtmp, &
1658  remapa1, remapa2, remapt1, remapt2, remapl1, remapl2, &
1659  remaptr1, remaptr2, remapn1, remapn2, lbestdata)
1660 CALL vol7d_merge_finald(this, that, v7dtmp, &
1661  remapa1, remapa2, remapt1, remapt2, remapl1, remapl2, &
1662  remaptr1, remaptr2, remapn1, remapn2, lbestdata)
1663 CALL vol7d_merge_finali(this, that, v7dtmp, &
1664  remapa1, remapa2, remapt1, remapt2, remapl1, remapl2, &
1665  remaptr1, remaptr2, remapn1, remapn2, lbestdata)
1666 CALL vol7d_merge_finalb(this, that, v7dtmp, &
1667  remapa1, remapa2, remapt1, remapt2, remapl1, remapl2, &
1668  remaptr1, remaptr2, remapn1, remapn2, lbestdata)
1669 CALL vol7d_merge_finalc(this, that, v7dtmp, &
1670  remapa1, remapa2, remapt1, remapt2, remapl1, remapl2, &
1671  remaptr1, remaptr2, remapn1, remapn2, lbestdata)
1672 
1673 ! Dealloco i vettori di rimappatura
1674 IF (ASSOCIATED(remapt1)) DEALLOCATE(remapt1)
1675 IF (ASSOCIATED(remapt2)) DEALLOCATE(remapt2)
1676 IF (ASSOCIATED(remaptr1)) DEALLOCATE(remaptr1)
1677 IF (ASSOCIATED(remaptr2)) DEALLOCATE(remaptr2)
1678 IF (ASSOCIATED(remapl1)) DEALLOCATE(remapl1)
1679 IF (ASSOCIATED(remapl2)) DEALLOCATE(remapl2)
1680 IF (ASSOCIATED(remapa1)) DEALLOCATE(remapa1)
1681 IF (ASSOCIATED(remapa2)) DEALLOCATE(remapa2)
1682 IF (ASSOCIATED(remapn1)) DEALLOCATE(remapn1)
1683 IF (ASSOCIATED(remapn2)) DEALLOCATE(remapn2)
1684 
1685 ! Distruggo il vecchio volume e assegno il nuovo a this
1686 CALL delete(this)
1687 this = v7dtmp
1688 ! Ricreo gli indici var-attr
1689 CALL vol7d_set_attr_ind(this)
1690 
1691 END SUBROUTINE vol7d_append
1692 
1693 
Distruttori per le 2 classi.
Costruttori per le classi datetime e timedelta.

Generated with Doxygen.