Changeset 1181


Ignore:
Timestamp:
06/23/17 15:01:41 (4 years ago)
Author:
rlacroix
Message:

Add a new field attribut "check_if_active".

If this attribut is set to "true", xios_send_field will check if the field is active at current timestep and will be a no-op if it is not.

Location:
XIOS/trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/config/field_attribute.conf

    r998 r1181  
    1616DECLARE_ATTRIBUTE(bool,      read_access) 
    1717DECLARE_ATTRIBUTE(bool,      indexed_output) 
     18DECLARE_ATTRIBUTE(bool,      check_if_active) 
    1819 
    1920DECLARE_ATTRIBUTE(StdString, domain_ref) 
  • XIOS/trunk/src/interface/c_attr/icfield_attr.cpp

    r1005 r1181  
    119119 
    120120 
     121  void cxios_set_field_check_if_active(field_Ptr field_hdl, bool check_if_active) 
     122  { 
     123    CTimer::get("XIOS").resume(); 
     124    field_hdl->check_if_active.setValue(check_if_active); 
     125    CTimer::get("XIOS").suspend(); 
     126  } 
     127 
     128  void cxios_get_field_check_if_active(field_Ptr field_hdl, bool* check_if_active) 
     129  { 
     130    CTimer::get("XIOS").resume(); 
     131    *check_if_active = field_hdl->check_if_active.getInheritedValue(); 
     132    CTimer::get("XIOS").suspend(); 
     133  } 
     134 
     135  bool cxios_is_defined_field_check_if_active(field_Ptr field_hdl) 
     136  { 
     137     CTimer::get("XIOS").resume(); 
     138     bool isDefined = field_hdl->check_if_active.hasInheritedValue(); 
     139     CTimer::get("XIOS").suspend(); 
     140     return isDefined; 
     141  } 
     142 
     143 
    121144  void cxios_set_field_compression_level(field_Ptr field_hdl, int compression_level) 
    122145  { 
  • XIOS/trunk/src/interface/c_attr/icfieldgroup_attr.cpp

    r1005 r1181  
    119119 
    120120 
     121  void cxios_set_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool check_if_active) 
     122  { 
     123    CTimer::get("XIOS").resume(); 
     124    fieldgroup_hdl->check_if_active.setValue(check_if_active); 
     125    CTimer::get("XIOS").suspend(); 
     126  } 
     127 
     128  void cxios_get_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool* check_if_active) 
     129  { 
     130    CTimer::get("XIOS").resume(); 
     131    *check_if_active = fieldgroup_hdl->check_if_active.getInheritedValue(); 
     132    CTimer::get("XIOS").suspend(); 
     133  } 
     134 
     135  bool cxios_is_defined_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl) 
     136  { 
     137     CTimer::get("XIOS").resume(); 
     138     bool isDefined = fieldgroup_hdl->check_if_active.hasInheritedValue(); 
     139     CTimer::get("XIOS").suspend(); 
     140     return isDefined; 
     141  } 
     142 
     143 
    121144  void cxios_set_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl, int compression_level) 
    122145  { 
  • XIOS/trunk/src/interface/fortran_attr/field_interface_attr.F90

    r1005 r1181  
    9292 
    9393 
     94    SUBROUTINE cxios_set_field_check_if_active(field_hdl, check_if_active) BIND(C) 
     95      USE ISO_C_BINDING 
     96      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     97      LOGICAL (KIND=C_BOOL)      , VALUE :: check_if_active 
     98    END SUBROUTINE cxios_set_field_check_if_active 
     99 
     100    SUBROUTINE cxios_get_field_check_if_active(field_hdl, check_if_active) BIND(C) 
     101      USE ISO_C_BINDING 
     102      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     103      LOGICAL (KIND=C_BOOL)             :: check_if_active 
     104    END SUBROUTINE cxios_get_field_check_if_active 
     105 
     106    FUNCTION cxios_is_defined_field_check_if_active(field_hdl) BIND(C) 
     107      USE ISO_C_BINDING 
     108      LOGICAL(kind=C_BOOL) :: cxios_is_defined_field_check_if_active 
     109      INTEGER (kind = C_INTPTR_T), VALUE :: field_hdl 
     110    END FUNCTION cxios_is_defined_field_check_if_active 
     111 
     112 
    94113    SUBROUTINE cxios_set_field_compression_level(field_hdl, compression_level) BIND(C) 
    95114      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/fieldgroup_interface_attr.F90

    r1005 r1181  
    9292 
    9393 
     94    SUBROUTINE cxios_set_fieldgroup_check_if_active(fieldgroup_hdl, check_if_active) BIND(C) 
     95      USE ISO_C_BINDING 
     96      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     97      LOGICAL (KIND=C_BOOL)      , VALUE :: check_if_active 
     98    END SUBROUTINE cxios_set_fieldgroup_check_if_active 
     99 
     100    SUBROUTINE cxios_get_fieldgroup_check_if_active(fieldgroup_hdl, check_if_active) BIND(C) 
     101      USE ISO_C_BINDING 
     102      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     103      LOGICAL (KIND=C_BOOL)             :: check_if_active 
     104    END SUBROUTINE cxios_get_fieldgroup_check_if_active 
     105 
     106    FUNCTION cxios_is_defined_fieldgroup_check_if_active(fieldgroup_hdl) BIND(C) 
     107      USE ISO_C_BINDING 
     108      LOGICAL(kind=C_BOOL) :: cxios_is_defined_fieldgroup_check_if_active 
     109      INTEGER (kind = C_INTPTR_T), VALUE :: fieldgroup_hdl 
     110    END FUNCTION cxios_is_defined_fieldgroup_check_if_active 
     111 
     112 
    94113    SUBROUTINE cxios_set_fieldgroup_compression_level(fieldgroup_hdl, compression_level) BIND(C) 
    95114      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/ifield_attr.F90

    r1005 r1181  
    1212 
    1313  SUBROUTINE xios(set_field_attr)  & 
    14     ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    15     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    16     , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    17     , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     14    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     15    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     16    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     17    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     18     ) 
    1819 
    1920    IMPLICIT NONE 
     
    2425      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods 
    2526      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode 
     27      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active 
     28      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 
    2629      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level 
    2730      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value 
     
    5962      (field_id,field_hdl) 
    6063      CALL xios(set_field_attr_hdl_)   & 
    61       ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    62       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    63       , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    64       , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     64      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     65      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     66      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     67      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     68       ) 
    6569 
    6670  END SUBROUTINE xios(set_field_attr) 
    6771 
    6872  SUBROUTINE xios(set_field_attr_hdl)  & 
    69     ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    70     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    71     , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    72     , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     73    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     74    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     75    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     76    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     77     ) 
    7378 
    7479    IMPLICIT NONE 
     
    7883      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods 
    7984      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode 
     85      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active 
     86      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 
    8087      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level 
    8188      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value 
     
    111118 
    112119      CALL xios(set_field_attr_hdl_)  & 
    113       ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    114       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    115       , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    116       , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     120      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     121      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     122      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     123      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     124       ) 
    117125 
    118126  END SUBROUTINE xios(set_field_attr_hdl) 
    119127 
    120128  SUBROUTINE xios(set_field_attr_hdl_)   & 
    121     ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_, default_value_  & 
    122     , detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_, freq_op_, grid_path_  & 
    123     , grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_  & 
    124     , scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_  & 
    125     ) 
     129    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, compression_level_  & 
     130    , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  & 
     131    , freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_  & 
     132    , read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_  & 
     133    , valid_max_, valid_min_ ) 
    126134 
    127135    IMPLICIT NONE 
     
    131139      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_ 
    132140      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode_ 
     141      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active_ 
     142      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp 
    133143      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level_ 
    134144      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value_ 
     
    183193      ENDIF 
    184194 
     195      IF (PRESENT(check_if_active_)) THEN 
     196        check_if_active__tmp = check_if_active_ 
     197        CALL cxios_set_field_check_if_active & 
     198      (field_hdl%daddr, check_if_active__tmp) 
     199      ENDIF 
     200 
    185201      IF (PRESENT(compression_level_)) THEN 
    186202        CALL cxios_set_field_compression_level & 
     
    321337 
    322338  SUBROUTINE xios(get_field_attr)  & 
    323     ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    324     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    325     , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    326     , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     339    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     340    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     341    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     342    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     343     ) 
    327344 
    328345    IMPLICIT NONE 
     
    333350      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods 
    334351      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode 
     352      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active 
     353      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 
    335354      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level 
    336355      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value 
     
    368387      (field_id,field_hdl) 
    369388      CALL xios(get_field_attr_hdl_)   & 
    370       ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    371       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    372       , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    373       , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     389      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     390      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     391      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     392      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     393       ) 
    374394 
    375395  END SUBROUTINE xios(get_field_attr) 
    376396 
    377397  SUBROUTINE xios(get_field_attr_hdl)  & 
    378     ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    379     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    380     , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    381     , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     398    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     399    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     400    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     401    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     402     ) 
    382403 
    383404    IMPLICIT NONE 
     
    387408      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods 
    388409      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode 
     410      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active 
     411      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 
    389412      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level 
    390413      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value 
     
    420443 
    421444      CALL xios(get_field_attr_hdl_)  & 
    422       ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    423       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    424       , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    425       , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     445      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     446      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     447      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     448      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     449       ) 
    426450 
    427451  END SUBROUTINE xios(get_field_attr_hdl) 
    428452 
    429453  SUBROUTINE xios(get_field_attr_hdl_)   & 
    430     ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_, default_value_  & 
    431     , detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_, freq_op_, grid_path_  & 
    432     , grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_  & 
    433     , scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_  & 
    434     ) 
     454    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, compression_level_  & 
     455    , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  & 
     456    , freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_  & 
     457    , read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_  & 
     458    , valid_max_, valid_min_ ) 
    435459 
    436460    IMPLICIT NONE 
     
    440464      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_ 
    441465      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode_ 
     466      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active_ 
     467      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp 
    442468      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level_ 
    443469      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value_ 
     
    492518      ENDIF 
    493519 
     520      IF (PRESENT(check_if_active_)) THEN 
     521        CALL cxios_get_field_check_if_active & 
     522      (field_hdl%daddr, check_if_active__tmp) 
     523        check_if_active_ = check_if_active__tmp 
     524      ENDIF 
     525 
    494526      IF (PRESENT(compression_level_)) THEN 
    495527        CALL cxios_get_field_compression_level & 
     
    630662 
    631663  SUBROUTINE xios(is_defined_field_attr)  & 
    632     ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    633     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    634     , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    635     , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     664    ( field_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     665    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     666    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     667    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     668     ) 
    636669 
    637670    IMPLICIT NONE 
     
    646679      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode 
    647680      LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp 
     681      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active 
     682      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp 
    648683      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level 
    649684      LOGICAL(KIND=C_BOOL) :: compression_level_tmp 
     
    702737      (field_id,field_hdl) 
    703738      CALL xios(is_defined_field_attr_hdl_)   & 
    704       ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    705       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    706       , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    707       , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     739      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     740      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     741      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     742      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     743       ) 
    708744 
    709745  END SUBROUTINE xios(is_defined_field_attr) 
    710746 
    711747  SUBROUTINE xios(is_defined_field_attr_hdl)  & 
    712     ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    713     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    714     , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    715     , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     748    ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     749    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     750    , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     751    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     752     ) 
    716753 
    717754    IMPLICIT NONE 
     
    725762      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode 
    726763      LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp 
     764      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active 
     765      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp 
    727766      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level 
    728767      LOGICAL(KIND=C_BOOL) :: compression_level_tmp 
     
    779818 
    780819      CALL xios(is_defined_field_attr_hdl_)  & 
    781       ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    782       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    783       , grid_ref, indexed_output, level, long_name, name, operation, prec, read_access, scalar_ref  & 
    784       , scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min ) 
     820      ( field_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     821      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     822      , grid_path, grid_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     823      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
     824       ) 
    785825 
    786826  END SUBROUTINE xios(is_defined_field_attr_hdl) 
    787827 
    788828  SUBROUTINE xios(is_defined_field_attr_hdl_)   & 
    789     ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_, default_value_  & 
    790     , detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_, freq_op_, grid_path_  & 
    791     , grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_, read_access_, scalar_ref_  & 
    792     , scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_, valid_max_, valid_min_  & 
    793     ) 
     829    ( field_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_, compression_level_  & 
     830    , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  & 
     831    , freq_op_, grid_path_, grid_ref_, indexed_output_, level_, long_name_, name_, operation_, prec_  & 
     832    , read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_, unit_  & 
     833    , valid_max_, valid_min_ ) 
    794834 
    795835    IMPLICIT NONE 
     
    803843      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode_ 
    804844      LOGICAL(KIND=C_BOOL) :: cell_methods_mode__tmp 
     845      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active_ 
     846      LOGICAL(KIND=C_BOOL) :: check_if_active__tmp 
    805847      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level_ 
    806848      LOGICAL(KIND=C_BOOL) :: compression_level__tmp 
     
    880922      ENDIF 
    881923 
     924      IF (PRESENT(check_if_active_)) THEN 
     925        check_if_active__tmp = cxios_is_defined_field_check_if_active & 
     926      (field_hdl%daddr) 
     927        check_if_active_ = check_if_active__tmp 
     928      ENDIF 
     929 
    882930      IF (PRESENT(compression_level_)) THEN 
    883931        compression_level__tmp = cxios_is_defined_field_compression_level & 
  • XIOS/trunk/src/interface/fortran_attr/ifieldgroup_attr.F90

    r1005 r1181  
    1212 
    1313  SUBROUTINE xios(set_fieldgroup_attr)  & 
    14     ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    15     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    16     , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     14    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     15    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     16    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    1717    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    1818     ) 
     
    2525      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods 
    2626      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode 
     27      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active 
     28      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 
    2729      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level 
    2830      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value 
     
    6163      (fieldgroup_id,fieldgroup_hdl) 
    6264      CALL xios(set_fieldgroup_attr_hdl_)   & 
    63       ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    64       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    65       , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     65      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     66      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     67      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    6668      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    6769       ) 
     
    7072 
    7173  SUBROUTINE xios(set_fieldgroup_attr_hdl)  & 
    72     ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    73     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    74     , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     74    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     75    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     76    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    7577    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    7678     ) 
     
    8284      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods 
    8385      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode 
     86      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active 
     87      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 
    8488      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level 
    8589      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value 
     
    116120 
    117121      CALL xios(set_fieldgroup_attr_hdl_)  & 
    118       ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    119       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    120       , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     122      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     123      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     124      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    121125      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    122126       ) 
     
    125129 
    126130  SUBROUTINE xios(set_fieldgroup_attr_hdl_)   & 
    127     ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_  & 
    128     , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  & 
    129     , freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_, name_, operation_  & 
    130     , prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_  & 
    131     , unit_, valid_max_, valid_min_ ) 
     131    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_  & 
     132    , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_  & 
     133    , freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_  & 
     134    , name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_  & 
     135    , ts_split_freq_, unit_, valid_max_, valid_min_ ) 
    132136 
    133137    IMPLICIT NONE 
     
    137141      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_ 
    138142      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: cell_methods_mode_ 
     143      LOGICAL  , OPTIONAL, INTENT(IN) :: check_if_active_ 
     144      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp 
    139145      INTEGER  , OPTIONAL, INTENT(IN) :: compression_level_ 
    140146      REAL (KIND=8) , OPTIONAL, INTENT(IN) :: default_value_ 
     
    190196      ENDIF 
    191197 
     198      IF (PRESENT(check_if_active_)) THEN 
     199        check_if_active__tmp = check_if_active_ 
     200        CALL cxios_set_fieldgroup_check_if_active & 
     201      (fieldgroup_hdl%daddr, check_if_active__tmp) 
     202      ENDIF 
     203 
    192204      IF (PRESENT(compression_level_)) THEN 
    193205        CALL cxios_set_fieldgroup_compression_level & 
     
    333345 
    334346  SUBROUTINE xios(get_fieldgroup_attr)  & 
    335     ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    336     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    337     , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     347    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     348    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     349    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    338350    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    339351     ) 
     
    346358      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods 
    347359      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode 
     360      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active 
     361      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 
    348362      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level 
    349363      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value 
     
    382396      (fieldgroup_id,fieldgroup_hdl) 
    383397      CALL xios(get_fieldgroup_attr_hdl_)   & 
    384       ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    385       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    386       , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     398      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     399      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     400      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    387401      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    388402       ) 
     
    391405 
    392406  SUBROUTINE xios(get_fieldgroup_attr_hdl)  & 
    393     ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    394     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    395     , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     407    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     408    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     409    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    396410    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    397411     ) 
     
    403417      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods 
    404418      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode 
     419      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active 
     420      LOGICAL (KIND=C_BOOL) :: check_if_active_tmp 
    405421      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level 
    406422      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value 
     
    437453 
    438454      CALL xios(get_fieldgroup_attr_hdl_)  & 
    439       ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    440       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    441       , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     455      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     456      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     457      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    442458      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    443459       ) 
     
    446462 
    447463  SUBROUTINE xios(get_fieldgroup_attr_hdl_)   & 
    448     ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_  & 
    449     , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  & 
    450     , freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_, name_, operation_  & 
    451     , prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_  & 
    452     , unit_, valid_max_, valid_min_ ) 
     464    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_  & 
     465    , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_  & 
     466    , freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_  & 
     467    , name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_  & 
     468    , ts_split_freq_, unit_, valid_max_, valid_min_ ) 
    453469 
    454470    IMPLICIT NONE 
     
    458474      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_ 
    459475      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: cell_methods_mode_ 
     476      LOGICAL  , OPTIONAL, INTENT(OUT) :: check_if_active_ 
     477      LOGICAL (KIND=C_BOOL) :: check_if_active__tmp 
    460478      INTEGER  , OPTIONAL, INTENT(OUT) :: compression_level_ 
    461479      REAL (KIND=8) , OPTIONAL, INTENT(OUT) :: default_value_ 
     
    511529      ENDIF 
    512530 
     531      IF (PRESENT(check_if_active_)) THEN 
     532        CALL cxios_get_fieldgroup_check_if_active & 
     533      (fieldgroup_hdl%daddr, check_if_active__tmp) 
     534        check_if_active_ = check_if_active__tmp 
     535      ENDIF 
     536 
    513537      IF (PRESENT(compression_level_)) THEN 
    514538        CALL cxios_get_fieldgroup_compression_level & 
     
    654678 
    655679  SUBROUTINE xios(is_defined_fieldgroup_attr)  & 
    656     ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    657     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    658     , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     680    ( fieldgroup_id, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     681    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     682    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    659683    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    660684     ) 
     
    671695      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode 
    672696      LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp 
     697      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active 
     698      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp 
    673699      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level 
    674700      LOGICAL(KIND=C_BOOL) :: compression_level_tmp 
     
    729755      (fieldgroup_id,fieldgroup_hdl) 
    730756      CALL xios(is_defined_fieldgroup_attr_hdl_)   & 
    731       ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    732       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    733       , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     757      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     758      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     759      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    734760      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    735761       ) 
     
    738764 
    739765  SUBROUTINE xios(is_defined_fieldgroup_attr_hdl)  & 
    740     ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    741     , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    742     , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     766    ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     767    , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     768    , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    743769    , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    744770     ) 
     
    754780      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode 
    755781      LOGICAL(KIND=C_BOOL) :: cell_methods_mode_tmp 
     782      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active 
     783      LOGICAL(KIND=C_BOOL) :: check_if_active_tmp 
    756784      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level 
    757785      LOGICAL(KIND=C_BOOL) :: compression_level_tmp 
     
    810838 
    811839      CALL xios(is_defined_fieldgroup_attr_hdl_)  & 
    812       ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, compression_level, default_value  & 
    813       , detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op, grid_path  & 
    814       , grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
     840      ( fieldgroup_hdl, add_offset, axis_ref, cell_methods, cell_methods_mode, check_if_active, compression_level  & 
     841      , default_value, detect_missing_value, domain_ref, enabled, expr, field_ref, freq_offset, freq_op  & 
     842      , grid_path, grid_ref, group_ref, indexed_output, level, long_name, name, operation, prec, read_access  & 
    815843      , scalar_ref, scale_factor, standard_name, ts_enabled, ts_split_freq, unit, valid_max, valid_min  & 
    816844       ) 
     
    819847 
    820848  SUBROUTINE xios(is_defined_fieldgroup_attr_hdl_)   & 
    821     ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, compression_level_  & 
    822     , default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_, freq_offset_  & 
    823     , freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_, name_, operation_  & 
    824     , prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_, ts_split_freq_  & 
    825     , unit_, valid_max_, valid_min_ ) 
     849    ( fieldgroup_hdl, add_offset_, axis_ref_, cell_methods_, cell_methods_mode_, check_if_active_  & 
     850    , compression_level_, default_value_, detect_missing_value_, domain_ref_, enabled_, expr_, field_ref_  & 
     851    , freq_offset_, freq_op_, grid_path_, grid_ref_, group_ref_, indexed_output_, level_, long_name_  & 
     852    , name_, operation_, prec_, read_access_, scalar_ref_, scale_factor_, standard_name_, ts_enabled_  & 
     853    , ts_split_freq_, unit_, valid_max_, valid_min_ ) 
    826854 
    827855    IMPLICIT NONE 
     
    835863      LOGICAL, OPTIONAL, INTENT(OUT) :: cell_methods_mode_ 
    836864      LOGICAL(KIND=C_BOOL) :: cell_methods_mode__tmp 
     865      LOGICAL, OPTIONAL, INTENT(OUT) :: check_if_active_ 
     866      LOGICAL(KIND=C_BOOL) :: check_if_active__tmp 
    837867      LOGICAL, OPTIONAL, INTENT(OUT) :: compression_level_ 
    838868      LOGICAL(KIND=C_BOOL) :: compression_level__tmp 
     
    914944      ENDIF 
    915945 
     946      IF (PRESENT(check_if_active_)) THEN 
     947        check_if_active__tmp = cxios_is_defined_fieldgroup_check_if_active & 
     948      (fieldgroup_hdl%daddr) 
     949        check_if_active_ = check_if_active__tmp 
     950      ENDIF 
     951 
    916952      IF (PRESENT(compression_level_)) THEN 
    917953        compression_level__tmp = cxios_is_defined_fieldgroup_compression_level & 
  • XIOS/trunk/src/node/field.cpp

    r1135 r1181  
    825825       else // The data might be passed from the model 
    826826       { 
     827          if (check_if_active.isEmpty()) check_if_active = false; 
    827828          bool ignoreMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 
    828829          double defaultValue  = ignoreMissingValue ? default_value : (!default_value.isEmpty() ? default_value : 0.0); 
     
    916917         if (!clientSourceFilter) 
    917918         { 
     919           if (check_if_active.isEmpty()) check_if_active = false; 
    918920           bool ignoreMissingValue = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); 
    919921           double defaultValue  = ignoreMissingValue ? default_value : (!default_value.isEmpty() ? default_value : 0.0);  
  • XIOS/trunk/src/node/field_impl.hpp

    r1007 r1181  
    1919  { 
    2020    if (clientSourceFilter) 
    21       clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data); 
     21    { 
     22      if (!check_if_active || isActive(true)) 
     23        clientSourceFilter->streamData(CContext::getCurrent()->getCalendar()->getCurrentDate(), _data); 
     24    } 
    2225    else if (instantDataFilter) 
    2326      ERROR("void CField::setData(const CArray<double, N>& _data)", 
Note: See TracChangeset for help on using the changeset viewer.