Ignore:
Timestamp:
07/05/16 15:59:23 (8 years ago)
Author:
mhnguyen
Message:

Adding Fortran interface for reduce_axis_to_scalar

Test
+) On Curie
+) Only compilation

File:
1 edited

Legend:

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

    r786 r891  
    1212 
    1313  SUBROUTINE xios(set_interpolate_axis_attr)  & 
    14     ( interpolate_axis_id, order, type ) 
     14    ( interpolate_axis_id, coordinate, order, type ) 
    1515 
    1616    IMPLICIT NONE 
    1717      TYPE(txios(interpolate_axis))  :: interpolate_axis_hdl 
    1818      CHARACTER(LEN=*), INTENT(IN) ::interpolate_axis_id 
     19      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: coordinate 
    1920      INTEGER  , OPTIONAL, INTENT(IN) :: order 
    2021      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
     
    2223      CALL xios(get_interpolate_axis_handle)(interpolate_axis_id,interpolate_axis_hdl) 
    2324      CALL xios(set_interpolate_axis_attr_hdl_)   & 
    24       ( interpolate_axis_hdl, order, type ) 
     25      ( interpolate_axis_hdl, coordinate, order, type ) 
    2526 
    2627  END SUBROUTINE xios(set_interpolate_axis_attr) 
    2728 
    2829  SUBROUTINE xios(set_interpolate_axis_attr_hdl)  & 
    29     ( interpolate_axis_hdl, order, type ) 
     30    ( interpolate_axis_hdl, coordinate, order, type ) 
    3031 
    3132    IMPLICIT NONE 
    3233      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl 
     34      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: coordinate 
    3335      INTEGER  , OPTIONAL, INTENT(IN) :: order 
    3436      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type 
    3537 
    3638      CALL xios(set_interpolate_axis_attr_hdl_)  & 
    37       ( interpolate_axis_hdl, order, type ) 
     39      ( interpolate_axis_hdl, coordinate, order, type ) 
    3840 
    3941  END SUBROUTINE xios(set_interpolate_axis_attr_hdl) 
    4042 
    4143  SUBROUTINE xios(set_interpolate_axis_attr_hdl_)   & 
    42     ( interpolate_axis_hdl, order_, type_ ) 
     44    ( interpolate_axis_hdl, coordinate_, order_, type_ ) 
    4345 
    4446    IMPLICIT NONE 
    4547      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl 
     48      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: coordinate_ 
    4649      INTEGER  , OPTIONAL, INTENT(IN) :: order_ 
    4750      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: type_ 
     51 
     52      IF (PRESENT(coordinate_)) THEN 
     53        CALL cxios_set_interpolate_axis_coordinate(interpolate_axis_hdl%daddr, coordinate_, len(coordinate_)) 
     54      ENDIF 
    4855 
    4956      IF (PRESENT(order_)) THEN 
     
    5865 
    5966  SUBROUTINE xios(get_interpolate_axis_attr)  & 
    60     ( interpolate_axis_id, order, type ) 
     67    ( interpolate_axis_id, coordinate, order, type ) 
    6168 
    6269    IMPLICIT NONE 
    6370      TYPE(txios(interpolate_axis))  :: interpolate_axis_hdl 
    6471      CHARACTER(LEN=*), INTENT(IN) ::interpolate_axis_id 
     72      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: coordinate 
    6573      INTEGER  , OPTIONAL, INTENT(OUT) :: order 
    6674      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
     
    6876      CALL xios(get_interpolate_axis_handle)(interpolate_axis_id,interpolate_axis_hdl) 
    6977      CALL xios(get_interpolate_axis_attr_hdl_)   & 
    70       ( interpolate_axis_hdl, order, type ) 
     78      ( interpolate_axis_hdl, coordinate, order, type ) 
    7179 
    7280  END SUBROUTINE xios(get_interpolate_axis_attr) 
    7381 
    7482  SUBROUTINE xios(get_interpolate_axis_attr_hdl)  & 
    75     ( interpolate_axis_hdl, order, type ) 
     83    ( interpolate_axis_hdl, coordinate, order, type ) 
    7684 
    7785    IMPLICIT NONE 
    7886      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl 
     87      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: coordinate 
    7988      INTEGER  , OPTIONAL, INTENT(OUT) :: order 
    8089      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type 
    8190 
    8291      CALL xios(get_interpolate_axis_attr_hdl_)  & 
    83       ( interpolate_axis_hdl, order, type ) 
     92      ( interpolate_axis_hdl, coordinate, order, type ) 
    8493 
    8594  END SUBROUTINE xios(get_interpolate_axis_attr_hdl) 
    8695 
    8796  SUBROUTINE xios(get_interpolate_axis_attr_hdl_)   & 
    88     ( interpolate_axis_hdl, order_, type_ ) 
     97    ( interpolate_axis_hdl, coordinate_, order_, type_ ) 
    8998 
    9099    IMPLICIT NONE 
    91100      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl 
     101      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: coordinate_ 
    92102      INTEGER  , OPTIONAL, INTENT(OUT) :: order_ 
    93103      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: type_ 
     104 
     105      IF (PRESENT(coordinate_)) THEN 
     106        CALL cxios_get_interpolate_axis_coordinate(interpolate_axis_hdl%daddr, coordinate_, len(coordinate_)) 
     107      ENDIF 
    94108 
    95109      IF (PRESENT(order_)) THEN 
     
    104118 
    105119  SUBROUTINE xios(is_defined_interpolate_axis_attr)  & 
    106     ( interpolate_axis_id, order, type ) 
     120    ( interpolate_axis_id, coordinate, order, type ) 
    107121 
    108122    IMPLICIT NONE 
    109123      TYPE(txios(interpolate_axis))  :: interpolate_axis_hdl 
    110124      CHARACTER(LEN=*), INTENT(IN) ::interpolate_axis_id 
     125      LOGICAL, OPTIONAL, INTENT(OUT) :: coordinate 
     126      LOGICAL(KIND=C_BOOL) :: coordinate_tmp 
    111127      LOGICAL, OPTIONAL, INTENT(OUT) :: order 
    112128      LOGICAL(KIND=C_BOOL) :: order_tmp 
     
    116132      CALL xios(get_interpolate_axis_handle)(interpolate_axis_id,interpolate_axis_hdl) 
    117133      CALL xios(is_defined_interpolate_axis_attr_hdl_)   & 
    118       ( interpolate_axis_hdl, order, type ) 
     134      ( interpolate_axis_hdl, coordinate, order, type ) 
    119135 
    120136  END SUBROUTINE xios(is_defined_interpolate_axis_attr) 
    121137 
    122138  SUBROUTINE xios(is_defined_interpolate_axis_attr_hdl)  & 
    123     ( interpolate_axis_hdl, order, type ) 
     139    ( interpolate_axis_hdl, coordinate, order, type ) 
    124140 
    125141    IMPLICIT NONE 
    126142      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl 
     143      LOGICAL, OPTIONAL, INTENT(OUT) :: coordinate 
     144      LOGICAL(KIND=C_BOOL) :: coordinate_tmp 
    127145      LOGICAL, OPTIONAL, INTENT(OUT) :: order 
    128146      LOGICAL(KIND=C_BOOL) :: order_tmp 
     
    131149 
    132150      CALL xios(is_defined_interpolate_axis_attr_hdl_)  & 
    133       ( interpolate_axis_hdl, order, type ) 
     151      ( interpolate_axis_hdl, coordinate, order, type ) 
    134152 
    135153  END SUBROUTINE xios(is_defined_interpolate_axis_attr_hdl) 
    136154 
    137155  SUBROUTINE xios(is_defined_interpolate_axis_attr_hdl_)   & 
    138     ( interpolate_axis_hdl, order_, type_ ) 
     156    ( interpolate_axis_hdl, coordinate_, order_, type_ ) 
    139157 
    140158    IMPLICIT NONE 
    141159      TYPE(txios(interpolate_axis)) , INTENT(IN) :: interpolate_axis_hdl 
     160      LOGICAL, OPTIONAL, INTENT(OUT) :: coordinate_ 
     161      LOGICAL(KIND=C_BOOL) :: coordinate__tmp 
    142162      LOGICAL, OPTIONAL, INTENT(OUT) :: order_ 
    143163      LOGICAL(KIND=C_BOOL) :: order__tmp 
    144164      LOGICAL, OPTIONAL, INTENT(OUT) :: type_ 
    145165      LOGICAL(KIND=C_BOOL) :: type__tmp 
     166 
     167      IF (PRESENT(coordinate_)) THEN 
     168        coordinate__tmp = cxios_is_defined_interpolate_axis_coordinate(interpolate_axis_hdl%daddr) 
     169        coordinate_ = coordinate__tmp 
     170      ENDIF 
    146171 
    147172      IF (PRESENT(order_)) THEN 
Note: See TracChangeset for help on using the changeset viewer.