Ignore:
Timestamp:
01/26/16 18:19:09 (8 years ago)
Author:
mhnguyen
Message:

Adding some attributes for axis and grid (ticket 71, 78)

+) Add index attribute for axis
+) Change mask?d to mask_?d for grid

Test
+) On Curie
+) Test passes

File:
1 edited

Legend:

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

    r779 r817  
    1212 
    1313  SUBROUTINE xios(set_axisgroup_attr)  & 
    14     ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     14    ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    1515    , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    1616 
     
    2525      INTEGER  , OPTIONAL, INTENT(IN) :: data_n 
    2626      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
     27      INTEGER  , OPTIONAL, INTENT(IN) :: index(:) 
    2728      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 
    2829      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:) 
     
    3940      CALL xios(get_axisgroup_handle)(axisgroup_id,axisgroup_hdl) 
    4041      CALL xios(set_axisgroup_attr_hdl_)   & 
    41       ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     42      ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    4243      , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    4344 
     
    4546 
    4647  SUBROUTINE xios(set_axisgroup_attr_hdl)  & 
    47     ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     48    ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    4849    , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    4950 
     
    5758      INTEGER  , OPTIONAL, INTENT(IN) :: data_n 
    5859      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
     60      INTEGER  , OPTIONAL, INTENT(IN) :: index(:) 
    5961      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 
    6062      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:) 
     
    7072 
    7173      CALL xios(set_axisgroup_attr_hdl_)  & 
    72       ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     74      ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    7375      , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    7476 
     
    7678 
    7779  SUBROUTINE xios(set_axisgroup_attr_hdl_)   & 
    78     ( axisgroup_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, group_ref_, long_name_  & 
    79     , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_  & 
    80     ) 
     80    ( axisgroup_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, group_ref_, index_  & 
     81    , long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_  & 
     82    , unit_, value_ ) 
    8183 
    8284    IMPLICIT NONE 
     
    8991      INTEGER  , OPTIONAL, INTENT(IN) :: data_n_ 
    9092      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_ 
     93      INTEGER  , OPTIONAL, INTENT(IN) :: index_(:) 
    9194      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_ 
    9295      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_(:) 
     
    129132      ENDIF 
    130133 
     134      IF (PRESENT(index_)) THEN 
     135        CALL cxios_set_axisgroup_index(axisgroup_hdl%daddr, index_, SHAPE(index_)) 
     136      ENDIF 
     137 
    131138      IF (PRESENT(long_name_)) THEN 
    132139        CALL cxios_set_axisgroup_long_name(axisgroup_hdl%daddr, long_name_, len(long_name_)) 
     
    174181 
    175182  SUBROUTINE xios(get_axisgroup_attr)  & 
    176     ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     183    ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    177184    , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    178185 
     
    187194      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n 
    188195      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
     196      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:) 
    189197      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 
    190198      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:) 
     
    201209      CALL xios(get_axisgroup_handle)(axisgroup_id,axisgroup_hdl) 
    202210      CALL xios(get_axisgroup_attr_hdl_)   & 
    203       ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     211      ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    204212      , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    205213 
     
    207215 
    208216  SUBROUTINE xios(get_axisgroup_attr_hdl)  & 
    209     ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     217    ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    210218    , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    211219 
     
    219227      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n 
    220228      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
     229      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:) 
    221230      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 
    222231      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:) 
     
    232241 
    233242      CALL xios(get_axisgroup_attr_hdl_)  & 
    234       ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     243      ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    235244      , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    236245 
     
    238247 
    239248  SUBROUTINE xios(get_axisgroup_attr_hdl_)   & 
    240     ( axisgroup_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, group_ref_, long_name_  & 
    241     , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_  & 
    242     ) 
     249    ( axisgroup_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, group_ref_, index_  & 
     250    , long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_  & 
     251    , unit_, value_ ) 
    243252 
    244253    IMPLICIT NONE 
     
    251260      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n_ 
    252261      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_ 
     262      INTEGER  , OPTIONAL, INTENT(OUT) :: index_(:) 
    253263      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_ 
    254264      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_(:) 
     
    291301      ENDIF 
    292302 
     303      IF (PRESENT(index_)) THEN 
     304        CALL cxios_get_axisgroup_index(axisgroup_hdl%daddr, index_, SHAPE(index_)) 
     305      ENDIF 
     306 
    293307      IF (PRESENT(long_name_)) THEN 
    294308        CALL cxios_get_axisgroup_long_name(axisgroup_hdl%daddr, long_name_, len(long_name_)) 
     
    336350 
    337351  SUBROUTINE xios(is_defined_axisgroup_attr)  & 
    338     ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     352    ( axisgroup_id, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    339353    , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    340354 
     
    356370      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref 
    357371      LOGICAL(KIND=C_BOOL) :: group_ref_tmp 
     372      LOGICAL, OPTIONAL, INTENT(OUT) :: index 
     373      LOGICAL(KIND=C_BOOL) :: index_tmp 
    358374      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name 
    359375      LOGICAL(KIND=C_BOOL) :: long_name_tmp 
     
    379395      CALL xios(get_axisgroup_handle)(axisgroup_id,axisgroup_hdl) 
    380396      CALL xios(is_defined_axisgroup_attr_hdl_)   & 
    381       ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     397      ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    382398      , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    383399 
     
    385401 
    386402  SUBROUTINE xios(is_defined_axisgroup_attr_hdl)  & 
    387     ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     403    ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    388404    , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    389405 
     
    404420      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref 
    405421      LOGICAL(KIND=C_BOOL) :: group_ref_tmp 
     422      LOGICAL, OPTIONAL, INTENT(OUT) :: index 
     423      LOGICAL(KIND=C_BOOL) :: index_tmp 
    406424      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name 
    407425      LOGICAL(KIND=C_BOOL) :: long_name_tmp 
     
    426444 
    427445      CALL xios(is_defined_axisgroup_attr_hdl_)  & 
    428       ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, long_name  & 
     446      ( axisgroup_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, group_ref, index, long_name  & 
    429447      , mask, n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    430448 
     
    432450 
    433451  SUBROUTINE xios(is_defined_axisgroup_attr_hdl_)   & 
    434     ( axisgroup_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, group_ref_, long_name_  & 
    435     , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_  & 
    436     ) 
     452    ( axisgroup_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, group_ref_, index_  & 
     453    , long_name_, mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_  & 
     454    , unit_, value_ ) 
    437455 
    438456    IMPLICIT NONE 
     
    452470      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref_ 
    453471      LOGICAL(KIND=C_BOOL) :: group_ref__tmp 
     472      LOGICAL, OPTIONAL, INTENT(OUT) :: index_ 
     473      LOGICAL(KIND=C_BOOL) :: index__tmp 
    454474      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_ 
    455475      LOGICAL(KIND=C_BOOL) :: long_name__tmp 
     
    508528      ENDIF 
    509529 
     530      IF (PRESENT(index_)) THEN 
     531        index__tmp = cxios_is_defined_axisgroup_index(axisgroup_hdl%daddr) 
     532        index_ = index__tmp 
     533      ENDIF 
     534 
    510535      IF (PRESENT(long_name_)) THEN 
    511536        long_name__tmp = cxios_is_defined_axisgroup_long_name(axisgroup_hdl%daddr) 
Note: See TracChangeset for help on using the changeset viewer.