Ignore:
Timestamp:
05/26/15 16:13:47 (9 years ago)
Author:
rlacroix
Message:

Add the infrastructure to request fields from the server.

This will be used to read input files so add a new file attribute mode to define whether data is written or read from a file.

Currently the data is not actually read and random data is transfered for those fields in read mode.

File:
1 edited

Legend:

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

    r581 r598  
    1212 
    1313  SUBROUTINE xios(set_filegroup_attr)  & 
    14     ( filegroup_id, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     14    ( filegroup_id, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    1515    , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    1616 
     
    2626      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
    2727      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits 
     28      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode 
    2829      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    2930      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix 
     
    3839      CALL xios(get_filegroup_handle)(filegroup_id,filegroup_hdl) 
    3940      CALL xios(set_filegroup_attr_hdl_)   & 
    40       ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     41      ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    4142      , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    4243 
     
    4445 
    4546  SUBROUTINE xios(set_filegroup_attr_hdl)  & 
    46     ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     47    ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    4748    , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    4849 
     
    5758      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
    5859      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits 
     60      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode 
    5961      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    6062      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix 
     
    6870 
    6971      CALL xios(set_filegroup_attr_hdl_)  & 
    70       ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     72      ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    7173      , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    7274 
     
    7476 
    7577  SUBROUTINE xios(set_filegroup_attr_hdl_)   & 
    76     ( filegroup_hdl, append_, description_, enabled_, format_, group_ref_, min_digits_, name_, name_suffix_  & 
    77     , output_freq_, output_level_, par_access_, split_freq_, split_freq_format_, sync_freq_, type_  & 
    78     ) 
     78    ( filegroup_hdl, append_, description_, enabled_, format_, group_ref_, min_digits_, mode_, name_  & 
     79    , name_suffix_, output_freq_, output_level_, par_access_, split_freq_, split_freq_format_, sync_freq_  & 
     80    , type_ ) 
    7981 
    8082    IMPLICIT NONE 
     
    8890      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_ 
    8991      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits_ 
     92      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: mode_ 
    9093      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
    9194      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix_ 
     
    124127      ENDIF 
    125128 
     129      IF (PRESENT(mode_)) THEN 
     130        CALL cxios_set_filegroup_mode(filegroup_hdl%daddr, mode_, len(mode_)) 
     131      ENDIF 
     132 
    126133      IF (PRESENT(name_)) THEN 
    127134        CALL cxios_set_filegroup_name(filegroup_hdl%daddr, name_, len(name_)) 
     
    163170 
    164171  SUBROUTINE xios(get_filegroup_attr)  & 
    165     ( filegroup_id, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     172    ( filegroup_id, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    166173    , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    167174 
     
    177184      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
    178185      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits 
     186      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode 
    179187      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    180188      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix 
     
    189197      CALL xios(get_filegroup_handle)(filegroup_id,filegroup_hdl) 
    190198      CALL xios(get_filegroup_attr_hdl_)   & 
    191       ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     199      ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    192200      , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    193201 
     
    195203 
    196204  SUBROUTINE xios(get_filegroup_attr_hdl)  & 
    197     ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     205    ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    198206    , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    199207 
     
    208216      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
    209217      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits 
     218      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode 
    210219      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    211220      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix 
     
    219228 
    220229      CALL xios(get_filegroup_attr_hdl_)  & 
    221       ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     230      ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    222231      , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    223232 
     
    225234 
    226235  SUBROUTINE xios(get_filegroup_attr_hdl_)   & 
    227     ( filegroup_hdl, append_, description_, enabled_, format_, group_ref_, min_digits_, name_, name_suffix_  & 
    228     , output_freq_, output_level_, par_access_, split_freq_, split_freq_format_, sync_freq_, type_  & 
    229     ) 
     236    ( filegroup_hdl, append_, description_, enabled_, format_, group_ref_, min_digits_, mode_, name_  & 
     237    , name_suffix_, output_freq_, output_level_, par_access_, split_freq_, split_freq_format_, sync_freq_  & 
     238    , type_ ) 
    230239 
    231240    IMPLICIT NONE 
     
    239248      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_ 
    240249      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits_ 
     250      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: mode_ 
    241251      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
    242252      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix_ 
     
    275285      ENDIF 
    276286 
     287      IF (PRESENT(mode_)) THEN 
     288        CALL cxios_get_filegroup_mode(filegroup_hdl%daddr, mode_, len(mode_)) 
     289      ENDIF 
     290 
    277291      IF (PRESENT(name_)) THEN 
    278292        CALL cxios_get_filegroup_name(filegroup_hdl%daddr, name_, len(name_)) 
     
    314328 
    315329  SUBROUTINE xios(is_defined_filegroup_attr)  & 
    316     ( filegroup_id, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     330    ( filegroup_id, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    317331    , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    318332 
     
    332346      LOGICAL, OPTIONAL, INTENT(OUT) :: min_digits 
    333347      LOGICAL(KIND=C_BOOL) :: min_digits_tmp 
     348      LOGICAL, OPTIONAL, INTENT(OUT) :: mode 
     349      LOGICAL(KIND=C_BOOL) :: mode_tmp 
    334350      LOGICAL, OPTIONAL, INTENT(OUT) :: name 
    335351      LOGICAL(KIND=C_BOOL) :: name_tmp 
     
    353369      CALL xios(get_filegroup_handle)(filegroup_id,filegroup_hdl) 
    354370      CALL xios(is_defined_filegroup_attr_hdl_)   & 
    355       ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     371      ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    356372      , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    357373 
     
    359375 
    360376  SUBROUTINE xios(is_defined_filegroup_attr_hdl)  & 
    361     ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     377    ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    362378    , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    363379 
     
    376392      LOGICAL, OPTIONAL, INTENT(OUT) :: min_digits 
    377393      LOGICAL(KIND=C_BOOL) :: min_digits_tmp 
     394      LOGICAL, OPTIONAL, INTENT(OUT) :: mode 
     395      LOGICAL(KIND=C_BOOL) :: mode_tmp 
    378396      LOGICAL, OPTIONAL, INTENT(OUT) :: name 
    379397      LOGICAL(KIND=C_BOOL) :: name_tmp 
     
    396414 
    397415      CALL xios(is_defined_filegroup_attr_hdl_)  & 
    398       ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, name, name_suffix  & 
     416      ( filegroup_hdl, append, description, enabled, format, group_ref, min_digits, mode, name, name_suffix  & 
    399417      , output_freq, output_level, par_access, split_freq, split_freq_format, sync_freq, type ) 
    400418 
     
    402420 
    403421  SUBROUTINE xios(is_defined_filegroup_attr_hdl_)   & 
    404     ( filegroup_hdl, append_, description_, enabled_, format_, group_ref_, min_digits_, name_, name_suffix_  & 
    405     , output_freq_, output_level_, par_access_, split_freq_, split_freq_format_, sync_freq_, type_  & 
    406     ) 
     422    ( filegroup_hdl, append_, description_, enabled_, format_, group_ref_, min_digits_, mode_, name_  & 
     423    , name_suffix_, output_freq_, output_level_, par_access_, split_freq_, split_freq_format_, sync_freq_  & 
     424    , type_ ) 
    407425 
    408426    IMPLICIT NONE 
     
    420438      LOGICAL, OPTIONAL, INTENT(OUT) :: min_digits_ 
    421439      LOGICAL(KIND=C_BOOL) :: min_digits__tmp 
     440      LOGICAL, OPTIONAL, INTENT(OUT) :: mode_ 
     441      LOGICAL(KIND=C_BOOL) :: mode__tmp 
    422442      LOGICAL, OPTIONAL, INTENT(OUT) :: name_ 
    423443      LOGICAL(KIND=C_BOOL) :: name__tmp 
     
    469489      ENDIF 
    470490 
     491      IF (PRESENT(mode_)) THEN 
     492        mode__tmp = cxios_is_defined_filegroup_mode(filegroup_hdl%daddr) 
     493        mode_ = mode__tmp 
     494      ENDIF 
     495 
    471496      IF (PRESENT(name_)) THEN 
    472497        name__tmp = cxios_is_defined_filegroup_name(filegroup_hdl%daddr) 
Note: See TracChangeset for help on using the changeset viewer.