Ignore:
Timestamp:
03/24/15 11:21:45 (9 years ago)
Author:
rlacroix
Message:

Fix the Fortran interface generation to avoid generating dead code that caused a timer not to be stopped.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/fortran_attr/iaxis_attr.F90

    r556 r581  
    88  USE iaxis 
    99  USE axis_interface_attr 
    10    
     10 
    1111CONTAINS 
    12    
     12 
    1313  SUBROUTINE xios(set_axis_attr)  & 
    1414    ( axis_id, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    1515    , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    16      
     16 
    1717    IMPLICIT NONE 
    1818      TYPE(txios(axis))  :: axis_hdl 
     
    3636      INTEGER  , OPTIONAL, INTENT(IN) :: zoom_end 
    3737      INTEGER  , OPTIONAL, INTENT(IN) :: zoom_size 
    38        
     38 
    3939      CALL xios(get_axis_handle)(axis_id,axis_hdl) 
    4040      CALL xios(set_axis_attr_hdl_)   & 
    4141      ( axis_hdl, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    4242      , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    43      
     43 
    4444  END SUBROUTINE xios(set_axis_attr) 
    45    
     45 
    4646  SUBROUTINE xios(set_axis_attr_hdl)  & 
    4747    ( axis_hdl, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    4848    , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    49      
     49 
    5050    IMPLICIT NONE 
    5151      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl 
     
    6868      INTEGER  , OPTIONAL, INTENT(IN) :: zoom_end 
    6969      INTEGER  , OPTIONAL, INTENT(IN) :: zoom_size 
    70        
     70 
    7171      CALL xios(set_axis_attr_hdl_)  & 
    7272      ( axis_hdl, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    7373      , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    74      
     74 
    7575  END SUBROUTINE xios(set_axis_attr_hdl) 
    76    
     76 
    7777  SUBROUTINE xios(set_axis_attr_hdl_)   & 
    7878    ( axis_hdl, axis_ref_, data_begin_, data_index_, data_n_, ibegin_, long_name_, mask_, name_  & 
    7979    , ni_, positive_, size_, standard_name_, unit_, value_, zoom_begin_, zoom_end_, zoom_size_ ) 
    80      
     80 
    8181    IMPLICIT NONE 
    8282      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl 
     
    9999      INTEGER  , OPTIONAL, INTENT(IN) :: zoom_end_ 
    100100      INTEGER  , OPTIONAL, INTENT(IN) :: zoom_size_ 
    101        
     101 
    102102      IF (PRESENT(axis_ref_)) THEN 
    103103        CALL cxios_set_axis_axis_ref(axis_hdl%daddr, axis_ref_, len(axis_ref_)) 
    104104      ENDIF 
    105        
     105 
    106106      IF (PRESENT(data_begin_)) THEN 
    107107        CALL cxios_set_axis_data_begin(axis_hdl%daddr, data_begin_) 
    108108      ENDIF 
    109        
     109 
    110110      IF (PRESENT(data_index_)) THEN 
    111         CALL cxios_set_axis_data_index(axis_hdl%daddr, data_index_,size(data_index_,1)) 
    112       ENDIF 
    113        
     111        CALL cxios_set_axis_data_index(axis_hdl%daddr, data_index_, size(data_index_,1)) 
     112      ENDIF 
     113 
    114114      IF (PRESENT(data_n_)) THEN 
    115115        CALL cxios_set_axis_data_n(axis_hdl%daddr, data_n_) 
    116116      ENDIF 
    117        
     117 
    118118      IF (PRESENT(ibegin_)) THEN 
    119119        CALL cxios_set_axis_ibegin(axis_hdl%daddr, ibegin_) 
    120120      ENDIF 
    121        
     121 
    122122      IF (PRESENT(long_name_)) THEN 
    123123        CALL cxios_set_axis_long_name(axis_hdl%daddr, long_name_, len(long_name_)) 
    124124      ENDIF 
    125        
     125 
    126126      IF (PRESENT(mask_)) THEN 
    127127        ALLOCATE(mask__tmp(size(mask_,1))) 
    128         mask__tmp=mask_ 
    129         CALL cxios_set_axis_mask(axis_hdl%daddr, mask__tmp,size(mask_,1)) 
    130       ENDIF 
    131        
     128        mask__tmp = mask_ 
     129        CALL cxios_set_axis_mask(axis_hdl%daddr, mask__tmp, size(mask_,1)) 
     130      ENDIF 
     131 
    132132      IF (PRESENT(name_)) THEN 
    133133        CALL cxios_set_axis_name(axis_hdl%daddr, name_, len(name_)) 
    134134      ENDIF 
    135        
     135 
    136136      IF (PRESENT(ni_)) THEN 
    137137        CALL cxios_set_axis_ni(axis_hdl%daddr, ni_) 
    138138      ENDIF 
    139        
     139 
    140140      IF (PRESENT(positive_)) THEN 
    141141        CALL cxios_set_axis_positive(axis_hdl%daddr, positive_, len(positive_)) 
    142142      ENDIF 
    143        
     143 
    144144      IF (PRESENT(size_)) THEN 
    145145        CALL cxios_set_axis_size(axis_hdl%daddr, size_) 
    146146      ENDIF 
    147        
     147 
    148148      IF (PRESENT(standard_name_)) THEN 
    149149        CALL cxios_set_axis_standard_name(axis_hdl%daddr, standard_name_, len(standard_name_)) 
    150150      ENDIF 
    151        
     151 
    152152      IF (PRESENT(unit_)) THEN 
    153153        CALL cxios_set_axis_unit(axis_hdl%daddr, unit_, len(unit_)) 
    154154      ENDIF 
    155        
     155 
    156156      IF (PRESENT(value_)) THEN 
    157         CALL cxios_set_axis_value(axis_hdl%daddr, value_,size(value_,1)) 
    158       ENDIF 
    159        
     157        CALL cxios_set_axis_value(axis_hdl%daddr, value_, size(value_,1)) 
     158      ENDIF 
     159 
    160160      IF (PRESENT(zoom_begin_)) THEN 
    161161        CALL cxios_set_axis_zoom_begin(axis_hdl%daddr, zoom_begin_) 
    162162      ENDIF 
    163        
     163 
    164164      IF (PRESENT(zoom_end_)) THEN 
    165165        CALL cxios_set_axis_zoom_end(axis_hdl%daddr, zoom_end_) 
    166166      ENDIF 
    167        
     167 
    168168      IF (PRESENT(zoom_size_)) THEN 
    169169        CALL cxios_set_axis_zoom_size(axis_hdl%daddr, zoom_size_) 
    170170      ENDIF 
    171        
    172        
    173      
     171 
    174172  END SUBROUTINE xios(set_axis_attr_hdl_) 
    175    
     173 
    176174  SUBROUTINE xios(get_axis_attr)  & 
    177175    ( axis_id, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    178176    , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    179      
     177 
    180178    IMPLICIT NONE 
    181179      TYPE(txios(axis))  :: axis_hdl 
     
    199197      INTEGER  , OPTIONAL, INTENT(OUT) :: zoom_end 
    200198      INTEGER  , OPTIONAL, INTENT(OUT) :: zoom_size 
    201        
     199 
    202200      CALL xios(get_axis_handle)(axis_id,axis_hdl) 
    203201      CALL xios(get_axis_attr_hdl_)   & 
    204202      ( axis_hdl, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    205203      , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    206      
     204 
    207205  END SUBROUTINE xios(get_axis_attr) 
    208    
     206 
    209207  SUBROUTINE xios(get_axis_attr_hdl)  & 
    210208    ( axis_hdl, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    211209    , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    212      
     210 
    213211    IMPLICIT NONE 
    214212      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl 
     
    231229      INTEGER  , OPTIONAL, INTENT(OUT) :: zoom_end 
    232230      INTEGER  , OPTIONAL, INTENT(OUT) :: zoom_size 
    233        
     231 
    234232      CALL xios(get_axis_attr_hdl_)  & 
    235233      ( axis_hdl, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    236234      , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    237      
     235 
    238236  END SUBROUTINE xios(get_axis_attr_hdl) 
    239    
     237 
    240238  SUBROUTINE xios(get_axis_attr_hdl_)   & 
    241239    ( axis_hdl, axis_ref_, data_begin_, data_index_, data_n_, ibegin_, long_name_, mask_, name_  & 
    242240    , ni_, positive_, size_, standard_name_, unit_, value_, zoom_begin_, zoom_end_, zoom_size_ ) 
    243      
     241 
    244242    IMPLICIT NONE 
    245243      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl 
     
    262260      INTEGER  , OPTIONAL, INTENT(OUT) :: zoom_end_ 
    263261      INTEGER  , OPTIONAL, INTENT(OUT) :: zoom_size_ 
    264        
     262 
    265263      IF (PRESENT(axis_ref_)) THEN 
    266264        CALL cxios_get_axis_axis_ref(axis_hdl%daddr, axis_ref_, len(axis_ref_)) 
    267265      ENDIF 
    268        
     266 
    269267      IF (PRESENT(data_begin_)) THEN 
    270268        CALL cxios_get_axis_data_begin(axis_hdl%daddr, data_begin_) 
    271269      ENDIF 
    272        
     270 
    273271      IF (PRESENT(data_index_)) THEN 
    274         CALL cxios_get_axis_data_index(axis_hdl%daddr, data_index_,size(data_index_,1)) 
    275       ENDIF 
    276        
     272        CALL cxios_get_axis_data_index(axis_hdl%daddr, data_index_, size(data_index_,1)) 
     273      ENDIF 
     274 
    277275      IF (PRESENT(data_n_)) THEN 
    278276        CALL cxios_get_axis_data_n(axis_hdl%daddr, data_n_) 
    279277      ENDIF 
    280        
     278 
    281279      IF (PRESENT(ibegin_)) THEN 
    282280        CALL cxios_get_axis_ibegin(axis_hdl%daddr, ibegin_) 
    283281      ENDIF 
    284        
     282 
    285283      IF (PRESENT(long_name_)) THEN 
    286284        CALL cxios_get_axis_long_name(axis_hdl%daddr, long_name_, len(long_name_)) 
    287285      ENDIF 
    288        
     286 
    289287      IF (PRESENT(mask_)) THEN 
    290288        ALLOCATE(mask__tmp(size(mask_,1))) 
    291         CALL cxios_get_axis_mask(axis_hdl%daddr, mask__tmp,size(mask_,1)) 
    292         mask_=mask__tmp 
    293       ENDIF 
    294        
     289        CALL cxios_get_axis_mask(axis_hdl%daddr, mask__tmp, size(mask_,1)) 
     290        mask_ = mask__tmp 
     291      ENDIF 
     292 
    295293      IF (PRESENT(name_)) THEN 
    296294        CALL cxios_get_axis_name(axis_hdl%daddr, name_, len(name_)) 
    297295      ENDIF 
    298        
     296 
    299297      IF (PRESENT(ni_)) THEN 
    300298        CALL cxios_get_axis_ni(axis_hdl%daddr, ni_) 
    301299      ENDIF 
    302        
     300 
    303301      IF (PRESENT(positive_)) THEN 
    304302        CALL cxios_get_axis_positive(axis_hdl%daddr, positive_, len(positive_)) 
    305303      ENDIF 
    306        
     304 
    307305      IF (PRESENT(size_)) THEN 
    308306        CALL cxios_get_axis_size(axis_hdl%daddr, size_) 
    309307      ENDIF 
    310        
     308 
    311309      IF (PRESENT(standard_name_)) THEN 
    312310        CALL cxios_get_axis_standard_name(axis_hdl%daddr, standard_name_, len(standard_name_)) 
    313311      ENDIF 
    314        
     312 
    315313      IF (PRESENT(unit_)) THEN 
    316314        CALL cxios_get_axis_unit(axis_hdl%daddr, unit_, len(unit_)) 
    317315      ENDIF 
    318        
     316 
    319317      IF (PRESENT(value_)) THEN 
    320         CALL cxios_get_axis_value(axis_hdl%daddr, value_,size(value_,1)) 
    321       ENDIF 
    322        
     318        CALL cxios_get_axis_value(axis_hdl%daddr, value_, size(value_,1)) 
     319      ENDIF 
     320 
    323321      IF (PRESENT(zoom_begin_)) THEN 
    324322        CALL cxios_get_axis_zoom_begin(axis_hdl%daddr, zoom_begin_) 
    325323      ENDIF 
    326        
     324 
    327325      IF (PRESENT(zoom_end_)) THEN 
    328326        CALL cxios_get_axis_zoom_end(axis_hdl%daddr, zoom_end_) 
    329327      ENDIF 
    330        
     328 
    331329      IF (PRESENT(zoom_size_)) THEN 
    332330        CALL cxios_get_axis_zoom_size(axis_hdl%daddr, zoom_size_) 
    333331      ENDIF 
    334        
    335        
    336      
     332 
    337333  END SUBROUTINE xios(get_axis_attr_hdl_) 
    338    
     334 
    339335  SUBROUTINE xios(is_defined_axis_attr)  & 
    340336    ( axis_id, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    341337    , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    342      
     338 
    343339    IMPLICIT NONE 
    344340      TYPE(txios(axis))  :: axis_hdl 
     
    378374      LOGICAL, OPTIONAL, INTENT(OUT) :: zoom_size 
    379375      LOGICAL(KIND=C_BOOL) :: zoom_size_tmp 
    380        
     376 
    381377      CALL xios(get_axis_handle)(axis_id,axis_hdl) 
    382378      CALL xios(is_defined_axis_attr_hdl_)   & 
    383379      ( axis_hdl, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    384380      , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    385      
     381 
    386382  END SUBROUTINE xios(is_defined_axis_attr) 
    387    
     383 
    388384  SUBROUTINE xios(is_defined_axis_attr_hdl)  & 
    389385    ( axis_hdl, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    390386    , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    391      
     387 
    392388    IMPLICIT NONE 
    393389      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl 
     
    426422      LOGICAL, OPTIONAL, INTENT(OUT) :: zoom_size 
    427423      LOGICAL(KIND=C_BOOL) :: zoom_size_tmp 
    428        
     424 
    429425      CALL xios(is_defined_axis_attr_hdl_)  & 
    430426      ( axis_hdl, axis_ref, data_begin, data_index, data_n, ibegin, long_name, mask, name, ni, positive  & 
    431427      , size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size ) 
    432      
     428 
    433429  END SUBROUTINE xios(is_defined_axis_attr_hdl) 
    434    
     430 
    435431  SUBROUTINE xios(is_defined_axis_attr_hdl_)   & 
    436432    ( axis_hdl, axis_ref_, data_begin_, data_index_, data_n_, ibegin_, long_name_, mask_, name_  & 
    437433    , ni_, positive_, size_, standard_name_, unit_, value_, zoom_begin_, zoom_end_, zoom_size_ ) 
    438      
     434 
    439435    IMPLICIT NONE 
    440436      TYPE(txios(axis)) , INTENT(IN) :: axis_hdl 
     
    473469      LOGICAL, OPTIONAL, INTENT(OUT) :: zoom_size_ 
    474470      LOGICAL(KIND=C_BOOL) :: zoom_size__tmp 
    475        
     471 
    476472      IF (PRESENT(axis_ref_)) THEN 
    477         axis_ref__tmp=cxios_is_defined_axis_axis_ref(axis_hdl%daddr) 
    478         axis_ref_=axis_ref__tmp 
    479       ENDIF 
    480        
     473        axis_ref__tmp = cxios_is_defined_axis_axis_ref(axis_hdl%daddr) 
     474        axis_ref_ = axis_ref__tmp 
     475      ENDIF 
     476 
    481477      IF (PRESENT(data_begin_)) THEN 
    482         data_begin__tmp=cxios_is_defined_axis_data_begin(axis_hdl%daddr) 
    483         data_begin_=data_begin__tmp 
    484       ENDIF 
    485        
     478        data_begin__tmp = cxios_is_defined_axis_data_begin(axis_hdl%daddr) 
     479        data_begin_ = data_begin__tmp 
     480      ENDIF 
     481 
    486482      IF (PRESENT(data_index_)) THEN 
    487         data_index__tmp=cxios_is_defined_axis_data_index(axis_hdl%daddr) 
    488         data_index_=data_index__tmp 
    489       ENDIF 
    490        
     483        data_index__tmp = cxios_is_defined_axis_data_index(axis_hdl%daddr) 
     484        data_index_ = data_index__tmp 
     485      ENDIF 
     486 
    491487      IF (PRESENT(data_n_)) THEN 
    492         data_n__tmp=cxios_is_defined_axis_data_n(axis_hdl%daddr) 
    493         data_n_=data_n__tmp 
    494       ENDIF 
    495        
     488        data_n__tmp = cxios_is_defined_axis_data_n(axis_hdl%daddr) 
     489        data_n_ = data_n__tmp 
     490      ENDIF 
     491 
    496492      IF (PRESENT(ibegin_)) THEN 
    497         ibegin__tmp=cxios_is_defined_axis_ibegin(axis_hdl%daddr) 
    498         ibegin_=ibegin__tmp 
    499       ENDIF 
    500        
     493        ibegin__tmp = cxios_is_defined_axis_ibegin(axis_hdl%daddr) 
     494        ibegin_ = ibegin__tmp 
     495      ENDIF 
     496 
    501497      IF (PRESENT(long_name_)) THEN 
    502         long_name__tmp=cxios_is_defined_axis_long_name(axis_hdl%daddr) 
    503         long_name_=long_name__tmp 
    504       ENDIF 
    505        
     498        long_name__tmp = cxios_is_defined_axis_long_name(axis_hdl%daddr) 
     499        long_name_ = long_name__tmp 
     500      ENDIF 
     501 
    506502      IF (PRESENT(mask_)) THEN 
    507         mask__tmp=cxios_is_defined_axis_mask(axis_hdl%daddr) 
    508         mask_=mask__tmp 
    509       ENDIF 
    510        
     503        mask__tmp = cxios_is_defined_axis_mask(axis_hdl%daddr) 
     504        mask_ = mask__tmp 
     505      ENDIF 
     506 
    511507      IF (PRESENT(name_)) THEN 
    512         name__tmp=cxios_is_defined_axis_name(axis_hdl%daddr) 
    513         name_=name__tmp 
    514       ENDIF 
    515        
     508        name__tmp = cxios_is_defined_axis_name(axis_hdl%daddr) 
     509        name_ = name__tmp 
     510      ENDIF 
     511 
    516512      IF (PRESENT(ni_)) THEN 
    517         ni__tmp=cxios_is_defined_axis_ni(axis_hdl%daddr) 
    518         ni_=ni__tmp 
    519       ENDIF 
    520        
     513        ni__tmp = cxios_is_defined_axis_ni(axis_hdl%daddr) 
     514        ni_ = ni__tmp 
     515      ENDIF 
     516 
    521517      IF (PRESENT(positive_)) THEN 
    522         positive__tmp=cxios_is_defined_axis_positive(axis_hdl%daddr) 
    523         positive_=positive__tmp 
    524       ENDIF 
    525        
     518        positive__tmp = cxios_is_defined_axis_positive(axis_hdl%daddr) 
     519        positive_ = positive__tmp 
     520      ENDIF 
     521 
    526522      IF (PRESENT(size_)) THEN 
    527         size__tmp=cxios_is_defined_axis_size(axis_hdl%daddr) 
    528         size_=size__tmp 
    529       ENDIF 
    530        
     523        size__tmp = cxios_is_defined_axis_size(axis_hdl%daddr) 
     524        size_ = size__tmp 
     525      ENDIF 
     526 
    531527      IF (PRESENT(standard_name_)) THEN 
    532         standard_name__tmp=cxios_is_defined_axis_standard_name(axis_hdl%daddr) 
    533         standard_name_=standard_name__tmp 
    534       ENDIF 
    535        
     528        standard_name__tmp = cxios_is_defined_axis_standard_name(axis_hdl%daddr) 
     529        standard_name_ = standard_name__tmp 
     530      ENDIF 
     531 
    536532      IF (PRESENT(unit_)) THEN 
    537         unit__tmp=cxios_is_defined_axis_unit(axis_hdl%daddr) 
    538         unit_=unit__tmp 
    539       ENDIF 
    540        
     533        unit__tmp = cxios_is_defined_axis_unit(axis_hdl%daddr) 
     534        unit_ = unit__tmp 
     535      ENDIF 
     536 
    541537      IF (PRESENT(value_)) THEN 
    542         value__tmp=cxios_is_defined_axis_value(axis_hdl%daddr) 
    543         value_=value__tmp 
    544       ENDIF 
    545        
     538        value__tmp = cxios_is_defined_axis_value(axis_hdl%daddr) 
     539        value_ = value__tmp 
     540      ENDIF 
     541 
    546542      IF (PRESENT(zoom_begin_)) THEN 
    547         zoom_begin__tmp=cxios_is_defined_axis_zoom_begin(axis_hdl%daddr) 
    548         zoom_begin_=zoom_begin__tmp 
    549       ENDIF 
    550        
     543        zoom_begin__tmp = cxios_is_defined_axis_zoom_begin(axis_hdl%daddr) 
     544        zoom_begin_ = zoom_begin__tmp 
     545      ENDIF 
     546 
    551547      IF (PRESENT(zoom_end_)) THEN 
    552         zoom_end__tmp=cxios_is_defined_axis_zoom_end(axis_hdl%daddr) 
    553         zoom_end_=zoom_end__tmp 
    554       ENDIF 
    555        
     548        zoom_end__tmp = cxios_is_defined_axis_zoom_end(axis_hdl%daddr) 
     549        zoom_end_ = zoom_end__tmp 
     550      ENDIF 
     551 
    556552      IF (PRESENT(zoom_size_)) THEN 
    557         zoom_size__tmp=cxios_is_defined_axis_zoom_size(axis_hdl%daddr) 
    558         zoom_size_=zoom_size__tmp 
    559       ENDIF 
    560        
    561        
    562      
     553        zoom_size__tmp = cxios_is_defined_axis_zoom_size(axis_hdl%daddr) 
     554        zoom_size_ = zoom_size__tmp 
     555      ENDIF 
     556 
    563557  END SUBROUTINE xios(is_defined_axis_attr_hdl_) 
    564    
     558 
    565559END MODULE iaxis_attr 
Note: See TracChangeset for help on using the changeset viewer.