Changeset 415 for XIOS/trunk


Ignore:
Timestamp:
01/20/13 23:14:35 (11 years ago)
Author:
ymipsl
Message:

Add grid mask attribute

YM

Location:
XIOS/trunk/src
Files:
24 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/attribute_array_decl.cpp

    r369 r415  
    88  template class CAttributeArray<int,1> ; 
    99  template class CAttributeArray<bool,2> ; 
     10  template class CAttributeArray<bool,3> ; 
    1011} 
  • XIOS/trunk/src/config/grid_attribute.conf

    r219 r415  
    33DECLARE_ATTRIBUTE(StdString, domain_ref) 
    44DECLARE_ATTRIBUTE(StdString, axis_ref) 
    5  
     5DECLARE_ARRAY(bool, 3 , mask) 
  • XIOS/trunk/src/declare_attribute.hpp

    r369 r415  
    2222   {                                                              \ 
    2323      public :                                                    \ 
     24         using CAttributeArray<T_num, T_rank>::operator = ;       \ 
    2425         name##_attr(void) : CAttributeArray<T_num, T_rank> (#name, *CAttributeMap::Current) {} \ 
    2526         virtual ~name##_attr(void) {}                            \ 
  • XIOS/trunk/src/generate_interface_impl.hpp

    r369 r415  
    603603    oss<<"{"<<iendl ;\ 
    604604    oss<<"  CTimer::get(\"XIOS\").resume();"<<iendl ; \ 
    605     oss<<"  CArray<"<<typeName<<",2> tmp("<<name<<",shape(extent1,extent2,extent3),neverDeleteData) ;"<<iendl ;\ 
     605    oss<<"  CArray<"<<typeName<<",3> tmp("<<name<<",shape(extent1,extent2,extent3),neverDeleteData) ;"<<iendl ;\ 
    606606    oss<<"  "<<className<<"_hdl->"<<name<<".reference(tmp.copy());"<<iendl ;\ 
    607607    oss<<"  "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ;\ 
     
    610610    oss<<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2, int extent3)"<<iendl ;\ 
    611611    oss<<"{"<<iendl; \ 
    612     oss<<"  CArray<"<<typeName<<",2> tmp("<<name<<",shape(extent1,extent2,extent3),neverDeleteData) ;"<<iendl ;\ 
     612    oss<<"  CArray<"<<typeName<<",3> tmp("<<name<<",shape(extent1,extent2,extent3),neverDeleteData) ;"<<iendl ;\ 
    613613    oss<<"  tmp="<<className<<"_hdl->"<<name<<" ;"<<iendl ;\ 
    614614    oss<<"   CTimer::get(\"XIOS\").suspend();"<<iendl ;\ 
  • XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp

    r369 r415  
    5151    if(!string_copy(axis_hdl->name.getValue(),name , name_size)) 
    5252      ERROR("void cxios_get_axis_name(axis_Ptr axis_hdl, char * name, int name_size)", <<"Input string is to short"); 
     53     CTimer::get("XIOS").suspend(); 
     54  } 
     55   
     56   
     57  void cxios_set_axis_positive(axis_Ptr axis_hdl, const char * positive, int positive_size) 
     58  { 
     59    std::string positive_str; 
     60    if(!cstr2string(positive, positive_size, positive_str)) return; 
     61     CTimer::get("XIOS").resume(); 
     62    axis_hdl->positive.fromString(positive_str); 
     63    axis_hdl->sendAttributToServer(axis_hdl->positive); 
     64     CTimer::get("XIOS").suspend(); 
     65  } 
     66   
     67  void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size) 
     68  { 
     69     CTimer::get("XIOS").resume(); 
     70    if(!string_copy(axis_hdl->positive.getStringValue(),positive , positive_size)) 
     71      ERROR("void cxios_get_axis_positive(axis_Ptr axis_hdl, char * positive, int positive_size)", <<"Input string is to short"); 
    5372     CTimer::get("XIOS").suspend(); 
    5473  } 
  • XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp

    r369 r415  
    7474   
    7575   
     76  void cxios_set_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, const char * positive, int positive_size) 
     77  { 
     78    std::string positive_str; 
     79    if(!cstr2string(positive, positive_size, positive_str)) return; 
     80     CTimer::get("XIOS").resume(); 
     81    axisgroup_hdl->positive.fromString(positive_str); 
     82    axisgroup_hdl->sendAttributToServer(axisgroup_hdl->positive); 
     83     CTimer::get("XIOS").suspend(); 
     84  } 
     85   
     86  void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size) 
     87  { 
     88     CTimer::get("XIOS").resume(); 
     89    if(!string_copy(axisgroup_hdl->positive.getStringValue(),positive , positive_size)) 
     90      ERROR("void cxios_get_axisgroup_positive(axisgroup_Ptr axisgroup_hdl, char * positive, int positive_size)", <<"Input string is to short"); 
     91     CTimer::get("XIOS").suspend(); 
     92  } 
     93   
     94   
    7695  void cxios_set_axisgroup_size(axisgroup_Ptr axisgroup_hdl, int size) 
    7796  { 
  • XIOS/trunk/src/interface/c_attr/icfile_attr.cpp

    r369 r415  
    5050   
    5151   
     52  void cxios_set_file_min_digits(file_Ptr file_hdl, int min_digits) 
     53  { 
     54     CTimer::get("XIOS").resume(); 
     55    file_hdl->min_digits.setValue(min_digits); 
     56    file_hdl->sendAttributToServer(file_hdl->min_digits); 
     57     CTimer::get("XIOS").suspend(); 
     58  } 
     59   
     60  void cxios_get_file_min_digits(file_Ptr file_hdl, int* min_digits) 
     61  { 
     62    *min_digits = file_hdl->min_digits.getValue(); 
     63  } 
     64   
     65   
    5266  void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size) 
    5367  { 
  • XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp

    r369 r415  
    6969   
    7070   
     71  void cxios_set_filegroup_min_digits(filegroup_Ptr filegroup_hdl, int min_digits) 
     72  { 
     73     CTimer::get("XIOS").resume(); 
     74    filegroup_hdl->min_digits.setValue(min_digits); 
     75    filegroup_hdl->sendAttributToServer(filegroup_hdl->min_digits); 
     76     CTimer::get("XIOS").suspend(); 
     77  } 
     78   
     79  void cxios_get_filegroup_min_digits(filegroup_Ptr filegroup_hdl, int* min_digits) 
     80  { 
     81    *min_digits = filegroup_hdl->min_digits.getValue(); 
     82  } 
     83   
     84   
    7185  void cxios_set_filegroup_name(filegroup_Ptr filegroup_hdl, const char * name, int name_size) 
    7286  { 
  • XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp

    r369 r415  
    7474   
    7575   
     76  void cxios_set_grid_mask(grid_Ptr grid_hdl, bool* mask, int extent1, int extent2, int extent3) 
     77  { 
     78    CTimer::get("XIOS").resume(); 
     79    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ; 
     80    grid_hdl->mask.reference(tmp.copy()); 
     81    grid_hdl->sendAttributToServer(grid_hdl->mask); 
     82  } 
     83   
     84  void cxios_get_grid_mask(grid_Ptr grid_hdl, bool* mask, int extent1, int extent2, int extent3) 
     85  { 
     86    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ; 
     87    tmp=grid_hdl->mask ; 
     88     CTimer::get("XIOS").suspend(); 
     89  } 
     90   
     91   
    7692  void cxios_set_grid_name(grid_Ptr grid_hdl, const char * name, int name_size) 
    7793  { 
  • XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp

    r369 r415  
    9393   
    9494   
     95  void cxios_set_gridgroup_mask(gridgroup_Ptr gridgroup_hdl, bool* mask, int extent1, int extent2, int extent3) 
     96  { 
     97    CTimer::get("XIOS").resume(); 
     98    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ; 
     99    gridgroup_hdl->mask.reference(tmp.copy()); 
     100    gridgroup_hdl->sendAttributToServer(gridgroup_hdl->mask); 
     101  } 
     102   
     103  void cxios_get_gridgroup_mask(gridgroup_Ptr gridgroup_hdl, bool* mask, int extent1, int extent2, int extent3) 
     104  { 
     105    CArray<bool,3> tmp(mask,shape(extent1,extent2,extent3),neverDeleteData) ; 
     106    tmp=gridgroup_hdl->mask ; 
     107     CTimer::get("XIOS").suspend(); 
     108  } 
     109   
     110   
    95111  void cxios_set_gridgroup_name(gridgroup_Ptr gridgroup_hdl, const char * name, int name_size) 
    96112  { 
  • XIOS/trunk/src/interface/fortran_attr/axis_interface_attr.f90

    r369 r415  
    3737      INTEGER  (kind = C_INT)     , VALUE        :: name_size 
    3838    END SUBROUTINE cxios_get_axis_name 
     39     
     40     
     41    SUBROUTINE cxios_set_axis_positive(axis_hdl, positive, positive_size) BIND(C) 
     42      USE ISO_C_BINDING 
     43      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 
     44      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive 
     45      INTEGER  (kind = C_INT)     , VALUE        :: positive_size 
     46    END SUBROUTINE cxios_set_axis_positive 
     47     
     48    SUBROUTINE cxios_get_axis_positive(axis_hdl, positive, positive_size) BIND(C) 
     49      USE ISO_C_BINDING 
     50      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 
     51      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive 
     52      INTEGER  (kind = C_INT)     , VALUE        :: positive_size 
     53    END SUBROUTINE cxios_get_axis_positive 
    3954     
    4055     
  • XIOS/trunk/src/interface/fortran_attr/axisgroup_interface_attr.f90

    r369 r415  
    5252      INTEGER  (kind = C_INT)     , VALUE        :: name_size 
    5353    END SUBROUTINE cxios_get_axisgroup_name 
     54     
     55     
     56    SUBROUTINE cxios_set_axisgroup_positive(axisgroup_hdl, positive, positive_size) BIND(C) 
     57      USE ISO_C_BINDING 
     58      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 
     59      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive 
     60      INTEGER  (kind = C_INT)     , VALUE        :: positive_size 
     61    END SUBROUTINE cxios_set_axisgroup_positive 
     62     
     63    SUBROUTINE cxios_get_axisgroup_positive(axisgroup_hdl, positive, positive_size) BIND(C) 
     64      USE ISO_C_BINDING 
     65      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 
     66      CHARACTER(kind = C_CHAR)    , DIMENSION(*) :: positive 
     67      INTEGER  (kind = C_INT)     , VALUE        :: positive_size 
     68    END SUBROUTINE cxios_get_axisgroup_positive 
    5469     
    5570     
  • XIOS/trunk/src/interface/fortran_attr/file_interface_attr.f90

    r336 r415  
    3535      LOGICAL (KIND=C_BOOL)             :: enabled 
    3636    END SUBROUTINE cxios_get_file_enabled 
     37     
     38     
     39    SUBROUTINE cxios_set_file_min_digits(file_hdl, min_digits) BIND(C) 
     40      USE ISO_C_BINDING 
     41      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     42      INTEGER (KIND=C_INT)      , VALUE :: min_digits 
     43    END SUBROUTINE cxios_set_file_min_digits 
     44     
     45    SUBROUTINE cxios_get_file_min_digits(file_hdl, min_digits) BIND(C) 
     46      USE ISO_C_BINDING 
     47      INTEGER (kind = C_INTPTR_T), VALUE :: file_hdl 
     48      INTEGER (KIND=C_INT)             :: min_digits 
     49    END SUBROUTINE cxios_get_file_min_digits 
    3750     
    3851     
  • XIOS/trunk/src/interface/fortran_attr/filegroup_interface_attr.f90

    r336 r415  
    5050      INTEGER  (kind = C_INT)     , VALUE        :: group_ref_size 
    5151    END SUBROUTINE cxios_get_filegroup_group_ref 
     52     
     53     
     54    SUBROUTINE cxios_set_filegroup_min_digits(filegroup_hdl, min_digits) BIND(C) 
     55      USE ISO_C_BINDING 
     56      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     57      INTEGER (KIND=C_INT)      , VALUE :: min_digits 
     58    END SUBROUTINE cxios_set_filegroup_min_digits 
     59     
     60    SUBROUTINE cxios_get_filegroup_min_digits(filegroup_hdl, min_digits) BIND(C) 
     61      USE ISO_C_BINDING 
     62      INTEGER (kind = C_INTPTR_T), VALUE :: filegroup_hdl 
     63      INTEGER (KIND=C_INT)             :: min_digits 
     64    END SUBROUTINE cxios_get_filegroup_min_digits 
    5265     
    5366     
  • XIOS/trunk/src/interface/fortran_attr/grid_interface_attr.f90

    r326 r415  
    5454     
    5555     
     56    SUBROUTINE cxios_set_grid_mask(grid_hdl, mask, extent1, extent2, extent3) BIND(C) 
     57      USE ISO_C_BINDING 
     58      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl 
     59      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask 
     60      INTEGER (kind = C_INT), VALUE  :: extent1 
     61      INTEGER (kind = C_INT), VALUE  :: extent2 
     62      INTEGER (kind = C_INT), VALUE  :: extent3 
     63    END SUBROUTINE cxios_set_grid_mask 
     64     
     65    SUBROUTINE cxios_get_grid_mask(grid_hdl, mask, extent1, extent2, extent3) BIND(C) 
     66      USE ISO_C_BINDING 
     67      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl 
     68      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask 
     69      INTEGER (kind = C_INT), VALUE  :: extent1 
     70      INTEGER (kind = C_INT), VALUE  :: extent2 
     71      INTEGER (kind = C_INT), VALUE  :: extent3 
     72    END SUBROUTINE cxios_get_grid_mask 
     73     
     74     
    5675    SUBROUTINE cxios_set_grid_name(grid_hdl, name, name_size) BIND(C) 
    5776      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/gridgroup_interface_attr.f90

    r326 r415  
    6969     
    7070     
     71    SUBROUTINE cxios_set_gridgroup_mask(gridgroup_hdl, mask, extent1, extent2, extent3) BIND(C) 
     72      USE ISO_C_BINDING 
     73      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl 
     74      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask 
     75      INTEGER (kind = C_INT), VALUE  :: extent1 
     76      INTEGER (kind = C_INT), VALUE  :: extent2 
     77      INTEGER (kind = C_INT), VALUE  :: extent3 
     78    END SUBROUTINE cxios_set_gridgroup_mask 
     79     
     80    SUBROUTINE cxios_get_gridgroup_mask(gridgroup_hdl, mask, extent1, extent2, extent3) BIND(C) 
     81      USE ISO_C_BINDING 
     82      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl 
     83      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask 
     84      INTEGER (kind = C_INT), VALUE  :: extent1 
     85      INTEGER (kind = C_INT), VALUE  :: extent2 
     86      INTEGER (kind = C_INT), VALUE  :: extent3 
     87    END SUBROUTINE cxios_get_gridgroup_mask 
     88     
     89     
    7190    SUBROUTINE cxios_set_gridgroup_name(gridgroup_hdl, name, name_size) BIND(C) 
    7291      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/iaxis_attr.F90

    r369 r415  
    1212   
    1313  SUBROUTINE xios(set_axis_attr)  & 
    14     ( axis_id, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size  & 
    15     ) 
     14    ( axis_id, long_name, name, positive, size, standard_name, unit, value, zoom_begin, zoom_end  & 
     15    , zoom_size ) 
    1616     
    1717    IMPLICIT NONE 
     
    2020      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 
    2121      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
     22      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 
    2223      INTEGER  , OPTIONAL, INTENT(IN) :: size 
    2324      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 
     
    3031      CALL xios(get_axis_handle)(axis_id,axis_hdl) 
    3132      CALL xios(set_axis_attr_hdl_)   & 
    32       ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size  & 
    33       ) 
     33      ( axis_hdl, long_name, name, positive, size, standard_name, unit, value, zoom_begin, zoom_end  & 
     34      , zoom_size ) 
    3435     
    3536  END SUBROUTINE xios(set_axis_attr) 
    3637   
    3738  SUBROUTINE xios(set_axis_attr_hdl)  & 
    38     ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size  & 
    39     ) 
     39    ( axis_hdl, long_name, name, positive, size, standard_name, unit, value, zoom_begin, zoom_end  & 
     40    , zoom_size ) 
    4041     
    4142    IMPLICIT NONE 
     
    4344      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 
    4445      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
     46      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 
    4547      INTEGER  , OPTIONAL, INTENT(IN) :: size 
    4648      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 
     
    5254       
    5355      CALL xios(set_axis_attr_hdl_)  & 
    54       ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size  & 
    55       ) 
     56      ( axis_hdl, long_name, name, positive, size, standard_name, unit, value, zoom_begin, zoom_end  & 
     57      , zoom_size ) 
    5658     
    5759  END SUBROUTINE xios(set_axis_attr_hdl) 
    5860   
    5961  SUBROUTINE xios(set_axis_attr_hdl_)   & 
    60     ( axis_hdl, long_name_, name_, size_, standard_name_, unit_, value_, zoom_begin_, zoom_end_  & 
    61     , zoom_size_ ) 
     62    ( axis_hdl, long_name_, name_, positive_, size_, standard_name_, unit_, value_, zoom_begin_  & 
     63    , zoom_end_, zoom_size_ ) 
    6264     
    6365    IMPLICIT NONE 
     
    6567      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_ 
    6668      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
     69      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive_ 
    6770      INTEGER  , OPTIONAL, INTENT(IN) :: size_ 
    6871      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_ 
     
    8184      ENDIF 
    8285       
     86      IF (PRESENT(positive_)) THEN 
     87        CALL cxios_set_axis_positive(axis_hdl%daddr, positive_, len(positive_)) 
     88      ENDIF 
     89       
    8390      IF (PRESENT(size_)) THEN 
    8491        CALL cxios_set_axis_size(axis_hdl%daddr, size_) 
     
    114121   
    115122  SUBROUTINE xios(get_axis_attr)  & 
    116     ( axis_id, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size  & 
    117     ) 
     123    ( axis_id, long_name, name, positive, size, standard_name, unit, value, zoom_begin, zoom_end  & 
     124    , zoom_size ) 
    118125     
    119126    IMPLICIT NONE 
     
    122129      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 
    123130      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
     131      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 
    124132      INTEGER  , OPTIONAL, INTENT(OUT) :: size 
    125133      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 
     
    132140      CALL xios(get_axis_handle)(axis_id,axis_hdl) 
    133141      CALL xios(get_axis_attr_hdl_)   & 
    134       ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size  & 
    135       ) 
     142      ( axis_hdl, long_name, name, positive, size, standard_name, unit, value, zoom_begin, zoom_end  & 
     143      , zoom_size ) 
    136144     
    137145  END SUBROUTINE xios(get_axis_attr) 
    138146   
    139147  SUBROUTINE xios(get_axis_attr_hdl)  & 
    140     ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size  & 
    141     ) 
     148    ( axis_hdl, long_name, name, positive, size, standard_name, unit, value, zoom_begin, zoom_end  & 
     149    , zoom_size ) 
    142150     
    143151    IMPLICIT NONE 
     
    145153      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 
    146154      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
     155      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 
    147156      INTEGER  , OPTIONAL, INTENT(OUT) :: size 
    148157      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 
     
    154163       
    155164      CALL xios(get_axis_attr_hdl_)  & 
    156       ( axis_hdl, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end, zoom_size  & 
    157       ) 
     165      ( axis_hdl, long_name, name, positive, size, standard_name, unit, value, zoom_begin, zoom_end  & 
     166      , zoom_size ) 
    158167     
    159168  END SUBROUTINE xios(get_axis_attr_hdl) 
    160169   
    161170  SUBROUTINE xios(get_axis_attr_hdl_)   & 
    162     ( axis_hdl, long_name_, name_, size_, standard_name_, unit_, value_, zoom_begin_, zoom_end_  & 
    163     , zoom_size_ ) 
     171    ( axis_hdl, long_name_, name_, positive_, size_, standard_name_, unit_, value_, zoom_begin_  & 
     172    , zoom_end_, zoom_size_ ) 
    164173     
    165174    IMPLICIT NONE 
     
    167176      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_ 
    168177      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
     178      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive_ 
    169179      INTEGER  , OPTIONAL, INTENT(OUT) :: size_ 
    170180      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_ 
     
    183193      ENDIF 
    184194       
     195      IF (PRESENT(positive_)) THEN 
     196        CALL cxios_get_axis_positive(axis_hdl%daddr, positive_, len(positive_)) 
     197      ENDIF 
     198       
    185199      IF (PRESENT(size_)) THEN 
    186200        CALL cxios_get_axis_size(axis_hdl%daddr, size_) 
  • XIOS/trunk/src/interface/fortran_attr/iaxisgroup_attr.F90

    r369 r415  
    1212   
    1313  SUBROUTINE xios(set_axisgroup_attr)  & 
    14     ( axisgroup_id, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end  & 
    15     , zoom_size ) 
     14    ( axisgroup_id, group_ref, long_name, name, positive, size, standard_name, unit, value, zoom_begin  & 
     15    , zoom_end, zoom_size ) 
    1616     
    1717    IMPLICIT NONE 
     
    2121      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 
    2222      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
     23      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 
    2324      INTEGER  , OPTIONAL, INTENT(IN) :: size 
    2425      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 
     
    3132      CALL xios(get_axisgroup_handle)(axisgroup_id,axisgroup_hdl) 
    3233      CALL xios(set_axisgroup_attr_hdl_)   & 
    33       ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end  & 
    34       , zoom_size ) 
     34      ( axisgroup_hdl, group_ref, long_name, name, positive, size, standard_name, unit, value, zoom_begin  & 
     35      , zoom_end, zoom_size ) 
    3536     
    3637  END SUBROUTINE xios(set_axisgroup_attr) 
    3738   
    3839  SUBROUTINE xios(set_axisgroup_attr_hdl)  & 
    39     ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end  & 
    40     , zoom_size ) 
     40    ( axisgroup_hdl, group_ref, long_name, name, positive, size, standard_name, unit, value, zoom_begin  & 
     41    , zoom_end, zoom_size ) 
    4142     
    4243    IMPLICIT NONE 
     
    4546      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 
    4647      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
     48      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 
    4749      INTEGER  , OPTIONAL, INTENT(IN) :: size 
    4850      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name 
     
    5456       
    5557      CALL xios(set_axisgroup_attr_hdl_)  & 
    56       ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end  & 
    57       , zoom_size ) 
     58      ( axisgroup_hdl, group_ref, long_name, name, positive, size, standard_name, unit, value, zoom_begin  & 
     59      , zoom_end, zoom_size ) 
    5860     
    5961  END SUBROUTINE xios(set_axisgroup_attr_hdl) 
    6062   
    6163  SUBROUTINE xios(set_axisgroup_attr_hdl_)   & 
    62     ( axisgroup_hdl, group_ref_, long_name_, name_, size_, standard_name_, unit_, value_, zoom_begin_  & 
    63     , zoom_end_, zoom_size_ ) 
     64    ( axisgroup_hdl, group_ref_, long_name_, name_, positive_, size_, standard_name_, unit_, value_  & 
     65    , zoom_begin_, zoom_end_, zoom_size_ ) 
    6466     
    6567    IMPLICIT NONE 
     
    6870      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_ 
    6971      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
     72      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive_ 
    7073      INTEGER  , OPTIONAL, INTENT(IN) :: size_ 
    7174      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_ 
     
    8891      ENDIF 
    8992       
     93      IF (PRESENT(positive_)) THEN 
     94        CALL cxios_set_axisgroup_positive(axisgroup_hdl%daddr, positive_, len(positive_)) 
     95      ENDIF 
     96       
    9097      IF (PRESENT(size_)) THEN 
    9198        CALL cxios_set_axisgroup_size(axisgroup_hdl%daddr, size_) 
     
    121128   
    122129  SUBROUTINE xios(get_axisgroup_attr)  & 
    123     ( axisgroup_id, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end  & 
    124     , zoom_size ) 
     130    ( axisgroup_id, group_ref, long_name, name, positive, size, standard_name, unit, value, zoom_begin  & 
     131    , zoom_end, zoom_size ) 
    125132     
    126133    IMPLICIT NONE 
     
    130137      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 
    131138      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
     139      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 
    132140      INTEGER  , OPTIONAL, INTENT(OUT) :: size 
    133141      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 
     
    140148      CALL xios(get_axisgroup_handle)(axisgroup_id,axisgroup_hdl) 
    141149      CALL xios(get_axisgroup_attr_hdl_)   & 
    142       ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end  & 
    143       , zoom_size ) 
     150      ( axisgroup_hdl, group_ref, long_name, name, positive, size, standard_name, unit, value, zoom_begin  & 
     151      , zoom_end, zoom_size ) 
    144152     
    145153  END SUBROUTINE xios(get_axisgroup_attr) 
    146154   
    147155  SUBROUTINE xios(get_axisgroup_attr_hdl)  & 
    148     ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end  & 
    149     , zoom_size ) 
     156    ( axisgroup_hdl, group_ref, long_name, name, positive, size, standard_name, unit, value, zoom_begin  & 
     157    , zoom_end, zoom_size ) 
    150158     
    151159    IMPLICIT NONE 
     
    154162      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 
    155163      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
     164      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 
    156165      INTEGER  , OPTIONAL, INTENT(OUT) :: size 
    157166      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name 
     
    163172       
    164173      CALL xios(get_axisgroup_attr_hdl_)  & 
    165       ( axisgroup_hdl, group_ref, long_name, name, size, standard_name, unit, value, zoom_begin, zoom_end  & 
    166       , zoom_size ) 
     174      ( axisgroup_hdl, group_ref, long_name, name, positive, size, standard_name, unit, value, zoom_begin  & 
     175      , zoom_end, zoom_size ) 
    167176     
    168177  END SUBROUTINE xios(get_axisgroup_attr_hdl) 
    169178   
    170179  SUBROUTINE xios(get_axisgroup_attr_hdl_)   & 
    171     ( axisgroup_hdl, group_ref_, long_name_, name_, size_, standard_name_, unit_, value_, zoom_begin_  & 
    172     , zoom_end_, zoom_size_ ) 
     180    ( axisgroup_hdl, group_ref_, long_name_, name_, positive_, size_, standard_name_, unit_, value_  & 
     181    , zoom_begin_, zoom_end_, zoom_size_ ) 
    173182     
    174183    IMPLICIT NONE 
     
    177186      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_ 
    178187      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
     188      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive_ 
    179189      INTEGER  , OPTIONAL, INTENT(OUT) :: size_ 
    180190      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_ 
     
    197207      ENDIF 
    198208       
     209      IF (PRESENT(positive_)) THEN 
     210        CALL cxios_get_axisgroup_positive(axisgroup_hdl%daddr, positive_, len(positive_)) 
     211      ENDIF 
     212       
    199213      IF (PRESENT(size_)) THEN 
    200214        CALL cxios_get_axisgroup_size(axisgroup_hdl%daddr, size_) 
  • XIOS/trunk/src/interface/fortran_attr/ifile_attr.F90

    r369 r415  
    1212   
    1313  SUBROUTINE xios(set_file_attr)  & 
    14     ( file_id, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq  & 
    15     , sync_freq, type ) 
     14    ( file_id, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access  & 
     15    , split_freq, sync_freq, type ) 
    1616     
    1717    IMPLICIT NONE 
     
    2121      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled 
    2222      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
     23      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits 
    2324      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    2425      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix 
     
    3233      CALL xios(get_file_handle)(file_id,file_hdl) 
    3334      CALL xios(set_file_attr_hdl_)   & 
    34       ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq  & 
    35       , sync_freq, type ) 
     35      ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access  & 
     36      , split_freq, sync_freq, type ) 
    3637     
    3738  END SUBROUTINE xios(set_file_attr) 
    3839   
    3940  SUBROUTINE xios(set_file_attr_hdl)  & 
    40     ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq  & 
    41     , sync_freq, type ) 
     41    ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access  & 
     42    , split_freq, sync_freq, type ) 
    4243     
    4344    IMPLICIT NONE 
     
    4647      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled 
    4748      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
     49      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits 
    4850      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    4951      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix 
     
    5658       
    5759      CALL xios(set_file_attr_hdl_)  & 
    58       ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq  & 
    59       , sync_freq, type ) 
     60      ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access  & 
     61      , split_freq, sync_freq, type ) 
    6062     
    6163  END SUBROUTINE xios(set_file_attr_hdl) 
    6264   
    6365  SUBROUTINE xios(set_file_attr_hdl_)   & 
    64     ( file_hdl, description_, enabled_, name_, name_suffix_, output_freq_, output_level_, par_access_  & 
    65     , split_freq_, sync_freq_, type_ ) 
     66    ( file_hdl, description_, enabled_, min_digits_, name_, name_suffix_, output_freq_, output_level_  & 
     67    , par_access_, split_freq_, sync_freq_, type_ ) 
    6668     
    6769    IMPLICIT NONE 
     
    7072      LOGICAL  , OPTIONAL, INTENT(IN) :: enabled_ 
    7173      LOGICAL (KIND=C_BOOL) :: enabled__tmp 
     74      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits_ 
    7275      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
    7376      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix_ 
     
    8891      ENDIF 
    8992       
     93      IF (PRESENT(min_digits_)) THEN 
     94        CALL cxios_set_file_min_digits(file_hdl%daddr, min_digits_) 
     95      ENDIF 
     96       
    9097      IF (PRESENT(name_)) THEN 
    9198        CALL cxios_set_file_name(file_hdl%daddr, name_, len(name_)) 
     
    125132   
    126133  SUBROUTINE xios(get_file_attr)  & 
    127     ( file_id, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq  & 
    128     , sync_freq, type ) 
     134    ( file_id, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access  & 
     135    , split_freq, sync_freq, type ) 
    129136     
    130137    IMPLICIT NONE 
     
    134141      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled 
    135142      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
     143      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits 
    136144      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    137145      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix 
     
    145153      CALL xios(get_file_handle)(file_id,file_hdl) 
    146154      CALL xios(get_file_attr_hdl_)   & 
    147       ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq  & 
    148       , sync_freq, type ) 
     155      ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access  & 
     156      , split_freq, sync_freq, type ) 
    149157     
    150158  END SUBROUTINE xios(get_file_attr) 
    151159   
    152160  SUBROUTINE xios(get_file_attr_hdl)  & 
    153     ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq  & 
    154     , sync_freq, type ) 
     161    ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access  & 
     162    , split_freq, sync_freq, type ) 
    155163     
    156164    IMPLICIT NONE 
     
    159167      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled 
    160168      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
     169      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits 
    161170      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    162171      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix 
     
    169178       
    170179      CALL xios(get_file_attr_hdl_)  & 
    171       ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq  & 
    172       , sync_freq, type ) 
     180      ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access  & 
     181      , split_freq, sync_freq, type ) 
    173182     
    174183  END SUBROUTINE xios(get_file_attr_hdl) 
    175184   
    176185  SUBROUTINE xios(get_file_attr_hdl_)   & 
    177     ( file_hdl, description_, enabled_, name_, name_suffix_, output_freq_, output_level_, par_access_  & 
    178     , split_freq_, sync_freq_, type_ ) 
     186    ( file_hdl, description_, enabled_, min_digits_, name_, name_suffix_, output_freq_, output_level_  & 
     187    , par_access_, split_freq_, sync_freq_, type_ ) 
    179188     
    180189    IMPLICIT NONE 
     
    183192      LOGICAL  , OPTIONAL, INTENT(OUT) :: enabled_ 
    184193      LOGICAL (KIND=C_BOOL) :: enabled__tmp 
     194      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits_ 
    185195      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
    186196      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix_ 
     
    201211      ENDIF 
    202212       
     213      IF (PRESENT(min_digits_)) THEN 
     214        CALL cxios_get_file_min_digits(file_hdl%daddr, min_digits_) 
     215      ENDIF 
     216       
    203217      IF (PRESENT(name_)) THEN 
    204218        CALL cxios_get_file_name(file_hdl%daddr, name_, len(name_)) 
  • XIOS/trunk/src/interface/fortran_attr/ifilegroup_attr.F90

    r369 r415  
    1212   
    1313  SUBROUTINE xios(set_filegroup_attr)  & 
    14     ( filegroup_id, description, enabled, group_ref, name, name_suffix, output_freq, output_level  & 
    15     , par_access, split_freq, sync_freq, type ) 
     14    ( filegroup_id, description, enabled, group_ref, min_digits, name, name_suffix, output_freq  & 
     15    , output_level, par_access, split_freq, sync_freq, type ) 
    1616     
    1717    IMPLICIT NONE 
     
    2222      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    2323      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
     24      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits 
    2425      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    2526      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix 
     
    3334      CALL xios(get_filegroup_handle)(filegroup_id,filegroup_hdl) 
    3435      CALL xios(set_filegroup_attr_hdl_)   & 
    35       ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level  & 
    36       , par_access, split_freq, sync_freq, type ) 
     36      ( filegroup_hdl, description, enabled, group_ref, min_digits, name, name_suffix, output_freq  & 
     37      , output_level, par_access, split_freq, sync_freq, type ) 
    3738     
    3839  END SUBROUTINE xios(set_filegroup_attr) 
    3940   
    4041  SUBROUTINE xios(set_filegroup_attr_hdl)  & 
    41     ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level  & 
    42     , par_access, split_freq, sync_freq, type ) 
     42    ( filegroup_hdl, description, enabled, group_ref, min_digits, name, name_suffix, output_freq  & 
     43    , output_level, par_access, split_freq, sync_freq, type ) 
    4344     
    4445    IMPLICIT NONE 
     
    4849      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    4950      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
     51      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits 
    5052      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    5153      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix 
     
    5860       
    5961      CALL xios(set_filegroup_attr_hdl_)  & 
    60       ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level  & 
    61       , par_access, split_freq, sync_freq, type ) 
     62      ( filegroup_hdl, description, enabled, group_ref, min_digits, name, name_suffix, output_freq  & 
     63      , output_level, par_access, split_freq, sync_freq, type ) 
    6264     
    6365  END SUBROUTINE xios(set_filegroup_attr_hdl) 
    6466   
    6567  SUBROUTINE xios(set_filegroup_attr_hdl_)   & 
    66     ( filegroup_hdl, description_, enabled_, group_ref_, name_, name_suffix_, output_freq_, output_level_  & 
    67     , par_access_, split_freq_, sync_freq_, type_ ) 
     68    ( filegroup_hdl, description_, enabled_, group_ref_, min_digits_, name_, name_suffix_, output_freq_  & 
     69    , output_level_, par_access_, split_freq_, sync_freq_, type_ ) 
    6870     
    6971    IMPLICIT NONE 
     
    7375      LOGICAL (KIND=C_BOOL) :: enabled__tmp 
    7476      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_ 
     77      INTEGER  , OPTIONAL, INTENT(IN) :: min_digits_ 
    7578      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
    7679      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix_ 
     
    9598      ENDIF 
    9699       
     100      IF (PRESENT(min_digits_)) THEN 
     101        CALL cxios_set_filegroup_min_digits(filegroup_hdl%daddr, min_digits_) 
     102      ENDIF 
     103       
    97104      IF (PRESENT(name_)) THEN 
    98105        CALL cxios_set_filegroup_name(filegroup_hdl%daddr, name_, len(name_)) 
     
    132139   
    133140  SUBROUTINE xios(get_filegroup_attr)  & 
    134     ( filegroup_id, description, enabled, group_ref, name, name_suffix, output_freq, output_level  & 
    135     , par_access, split_freq, sync_freq, type ) 
     141    ( filegroup_id, description, enabled, group_ref, min_digits, name, name_suffix, output_freq  & 
     142    , output_level, par_access, split_freq, sync_freq, type ) 
    136143     
    137144    IMPLICIT NONE 
     
    142149      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    143150      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
     151      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits 
    144152      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    145153      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix 
     
    153161      CALL xios(get_filegroup_handle)(filegroup_id,filegroup_hdl) 
    154162      CALL xios(get_filegroup_attr_hdl_)   & 
    155       ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level  & 
    156       , par_access, split_freq, sync_freq, type ) 
     163      ( filegroup_hdl, description, enabled, group_ref, min_digits, name, name_suffix, output_freq  & 
     164      , output_level, par_access, split_freq, sync_freq, type ) 
    157165     
    158166  END SUBROUTINE xios(get_filegroup_attr) 
    159167   
    160168  SUBROUTINE xios(get_filegroup_attr_hdl)  & 
    161     ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level  & 
    162     , par_access, split_freq, sync_freq, type ) 
     169    ( filegroup_hdl, description, enabled, group_ref, min_digits, name, name_suffix, output_freq  & 
     170    , output_level, par_access, split_freq, sync_freq, type ) 
    163171     
    164172    IMPLICIT NONE 
     
    168176      LOGICAL (KIND=C_BOOL) :: enabled_tmp 
    169177      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
     178      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits 
    170179      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    171180      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix 
     
    178187       
    179188      CALL xios(get_filegroup_attr_hdl_)  & 
    180       ( filegroup_hdl, description, enabled, group_ref, name, name_suffix, output_freq, output_level  & 
    181       , par_access, split_freq, sync_freq, type ) 
     189      ( filegroup_hdl, description, enabled, group_ref, min_digits, name, name_suffix, output_freq  & 
     190      , output_level, par_access, split_freq, sync_freq, type ) 
    182191     
    183192  END SUBROUTINE xios(get_filegroup_attr_hdl) 
    184193   
    185194  SUBROUTINE xios(get_filegroup_attr_hdl_)   & 
    186     ( filegroup_hdl, description_, enabled_, group_ref_, name_, name_suffix_, output_freq_, output_level_  & 
    187     , par_access_, split_freq_, sync_freq_, type_ ) 
     195    ( filegroup_hdl, description_, enabled_, group_ref_, min_digits_, name_, name_suffix_, output_freq_  & 
     196    , output_level_, par_access_, split_freq_, sync_freq_, type_ ) 
    188197     
    189198    IMPLICIT NONE 
     
    193202      LOGICAL (KIND=C_BOOL) :: enabled__tmp 
    194203      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_ 
     204      INTEGER  , OPTIONAL, INTENT(OUT) :: min_digits_ 
    195205      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
    196206      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix_ 
     
    215225      ENDIF 
    216226       
     227      IF (PRESENT(min_digits_)) THEN 
     228        CALL cxios_get_filegroup_min_digits(filegroup_hdl%daddr, min_digits_) 
     229      ENDIF 
     230       
    217231      IF (PRESENT(name_)) THEN 
    218232        CALL cxios_get_filegroup_name(filegroup_hdl%daddr, name_, len(name_)) 
  • XIOS/trunk/src/interface/fortran_attr/igrid_attr.F90

    r326 r415  
    1212   
    1313  SUBROUTINE xios(set_grid_attr)  & 
    14     ( grid_id, axis_ref, description, domain_ref, name ) 
     14    ( grid_id, axis_ref, description, domain_ref, mask, name ) 
    1515     
    1616    IMPLICIT NONE 
     
    2020      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description 
    2121      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref 
     22      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:,:,:) 
     23      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 
    2224      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    2325       
    2426      CALL xios(get_grid_handle)(grid_id,grid_hdl) 
    2527      CALL xios(set_grid_attr_hdl_)   & 
    26       ( grid_hdl, axis_ref, description, domain_ref, name ) 
     28      ( grid_hdl, axis_ref, description, domain_ref, mask, name ) 
    2729     
    2830  END SUBROUTINE xios(set_grid_attr) 
    2931   
    3032  SUBROUTINE xios(set_grid_attr_hdl)  & 
    31     ( grid_hdl, axis_ref, description, domain_ref, name ) 
     33    ( grid_hdl, axis_ref, description, domain_ref, mask, name ) 
    3234     
    3335    IMPLICIT NONE 
     
    3638      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description 
    3739      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref 
     40      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:,:,:) 
     41      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 
    3842      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    3943       
    4044      CALL xios(set_grid_attr_hdl_)  & 
    41       ( grid_hdl, axis_ref, description, domain_ref, name ) 
     45      ( grid_hdl, axis_ref, description, domain_ref, mask, name ) 
    4246     
    4347  END SUBROUTINE xios(set_grid_attr_hdl) 
    4448   
    4549  SUBROUTINE xios(set_grid_attr_hdl_)   & 
    46     ( grid_hdl, axis_ref_, description_, domain_ref_, name_ ) 
     50    ( grid_hdl, axis_ref_, description_, domain_ref_, mask_, name_ ) 
    4751     
    4852    IMPLICIT NONE 
     
    5155      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description_ 
    5256      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref_ 
     57      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_(:,:,:) 
     58      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:) 
    5359      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
    5460       
     
    6571      ENDIF 
    6672       
     73      IF (PRESENT(mask_)) THEN 
     74        ALLOCATE(mask__tmp(size(mask_,1),size(mask_,2),size(mask_,3))) 
     75        mask__tmp=mask_ 
     76        CALL cxios_set_grid_mask(grid_hdl%daddr, mask__tmp,size(mask_,1),size(mask_,2),size(mask_,3)) 
     77      ENDIF 
     78       
    6779      IF (PRESENT(name_)) THEN 
    6880        CALL cxios_set_grid_name(grid_hdl%daddr, name_, len(name_)) 
     
    7486   
    7587  SUBROUTINE xios(get_grid_attr)  & 
    76     ( grid_id, axis_ref, description, domain_ref, name ) 
     88    ( grid_id, axis_ref, description, domain_ref, mask, name ) 
    7789     
    7890    IMPLICIT NONE 
     
    8294      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description 
    8395      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref 
     96      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:,:,:) 
     97      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 
    8498      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    8599       
    86100      CALL xios(get_grid_handle)(grid_id,grid_hdl) 
    87101      CALL xios(get_grid_attr_hdl_)   & 
    88       ( grid_hdl, axis_ref, description, domain_ref, name ) 
     102      ( grid_hdl, axis_ref, description, domain_ref, mask, name ) 
    89103     
    90104  END SUBROUTINE xios(get_grid_attr) 
    91105   
    92106  SUBROUTINE xios(get_grid_attr_hdl)  & 
    93     ( grid_hdl, axis_ref, description, domain_ref, name ) 
     107    ( grid_hdl, axis_ref, description, domain_ref, mask, name ) 
    94108     
    95109    IMPLICIT NONE 
     
    98112      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description 
    99113      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref 
     114      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:,:,:) 
     115      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 
    100116      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    101117       
    102118      CALL xios(get_grid_attr_hdl_)  & 
    103       ( grid_hdl, axis_ref, description, domain_ref, name ) 
     119      ( grid_hdl, axis_ref, description, domain_ref, mask, name ) 
    104120     
    105121  END SUBROUTINE xios(get_grid_attr_hdl) 
    106122   
    107123  SUBROUTINE xios(get_grid_attr_hdl_)   & 
    108     ( grid_hdl, axis_ref_, description_, domain_ref_, name_ ) 
     124    ( grid_hdl, axis_ref_, description_, domain_ref_, mask_, name_ ) 
    109125     
    110126    IMPLICIT NONE 
     
    113129      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description_ 
    114130      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref_ 
     131      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_(:,:,:) 
     132      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:) 
    115133      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
    116134       
     
    127145      ENDIF 
    128146       
     147      IF (PRESENT(mask_)) THEN 
     148        ALLOCATE(mask__tmp(size(mask_,1),size(mask_,2),size(mask_,3))) 
     149        CALL cxios_get_grid_mask(grid_hdl%daddr, mask__tmp,size(mask_,1),size(mask_,2),size(mask_,3)) 
     150        mask_=mask__tmp 
     151      ENDIF 
     152       
    129153      IF (PRESENT(name_)) THEN 
    130154        CALL cxios_get_grid_name(grid_hdl%daddr, name_, len(name_)) 
  • XIOS/trunk/src/interface/fortran_attr/igridgroup_attr.F90

    r326 r415  
    1212   
    1313  SUBROUTINE xios(set_gridgroup_attr)  & 
    14     ( gridgroup_id, axis_ref, description, domain_ref, group_ref, name ) 
     14    ( gridgroup_id, axis_ref, description, domain_ref, group_ref, mask, name ) 
    1515     
    1616    IMPLICIT NONE 
     
    2121      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref 
    2222      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
     23      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:,:,:) 
     24      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 
    2325      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    2426       
    2527      CALL xios(get_gridgroup_handle)(gridgroup_id,gridgroup_hdl) 
    2628      CALL xios(set_gridgroup_attr_hdl_)   & 
    27       ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, name ) 
     29      ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, mask, name ) 
    2830     
    2931  END SUBROUTINE xios(set_gridgroup_attr) 
    3032   
    3133  SUBROUTINE xios(set_gridgroup_attr_hdl)  & 
    32     ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, name ) 
     34    ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, mask, name ) 
    3335     
    3436    IMPLICIT NONE 
     
    3840      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref 
    3941      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
     42      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:,:,:) 
     43      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 
    4044      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    4145       
    4246      CALL xios(set_gridgroup_attr_hdl_)  & 
    43       ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, name ) 
     47      ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, mask, name ) 
    4448     
    4549  END SUBROUTINE xios(set_gridgroup_attr_hdl) 
    4650   
    4751  SUBROUTINE xios(set_gridgroup_attr_hdl_)   & 
    48     ( gridgroup_hdl, axis_ref_, description_, domain_ref_, group_ref_, name_ ) 
     52    ( gridgroup_hdl, axis_ref_, description_, domain_ref_, group_ref_, mask_, name_ ) 
    4953     
    5054    IMPLICIT NONE 
     
    5458      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref_ 
    5559      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_ 
     60      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_(:,:,:) 
     61      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:) 
    5662      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
    5763       
     
    7278      ENDIF 
    7379       
     80      IF (PRESENT(mask_)) THEN 
     81        ALLOCATE(mask__tmp(size(mask_,1),size(mask_,2),size(mask_,3))) 
     82        mask__tmp=mask_ 
     83        CALL cxios_set_gridgroup_mask(gridgroup_hdl%daddr, mask__tmp,size(mask_,1),size(mask_,2),size(mask_,3)) 
     84      ENDIF 
     85       
    7486      IF (PRESENT(name_)) THEN 
    7587        CALL cxios_set_gridgroup_name(gridgroup_hdl%daddr, name_, len(name_)) 
     
    8193   
    8294  SUBROUTINE xios(get_gridgroup_attr)  & 
    83     ( gridgroup_id, axis_ref, description, domain_ref, group_ref, name ) 
     95    ( gridgroup_id, axis_ref, description, domain_ref, group_ref, mask, name ) 
    8496     
    8597    IMPLICIT NONE 
     
    90102      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref 
    91103      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
     104      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:,:,:) 
     105      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 
    92106      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    93107       
    94108      CALL xios(get_gridgroup_handle)(gridgroup_id,gridgroup_hdl) 
    95109      CALL xios(get_gridgroup_attr_hdl_)   & 
    96       ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, name ) 
     110      ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, mask, name ) 
    97111     
    98112  END SUBROUTINE xios(get_gridgroup_attr) 
    99113   
    100114  SUBROUTINE xios(get_gridgroup_attr_hdl)  & 
    101     ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, name ) 
     115    ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, mask, name ) 
    102116     
    103117    IMPLICIT NONE 
     
    107121      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref 
    108122      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
     123      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:,:,:) 
     124      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 
    109125      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    110126       
    111127      CALL xios(get_gridgroup_attr_hdl_)  & 
    112       ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, name ) 
     128      ( gridgroup_hdl, axis_ref, description, domain_ref, group_ref, mask, name ) 
    113129     
    114130  END SUBROUTINE xios(get_gridgroup_attr_hdl) 
    115131   
    116132  SUBROUTINE xios(get_gridgroup_attr_hdl_)   & 
    117     ( gridgroup_hdl, axis_ref_, description_, domain_ref_, group_ref_, name_ ) 
     133    ( gridgroup_hdl, axis_ref_, description_, domain_ref_, group_ref_, mask_, name_ ) 
    118134     
    119135    IMPLICIT NONE 
     
    123139      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref_ 
    124140      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_ 
     141      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_(:,:,:) 
     142      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:) 
    125143      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
    126144       
     
    141159      ENDIF 
    142160       
     161      IF (PRESENT(mask_)) THEN 
     162        ALLOCATE(mask__tmp(size(mask_,1),size(mask_,2),size(mask_,3))) 
     163        CALL cxios_get_gridgroup_mask(gridgroup_hdl%daddr, mask__tmp,size(mask_,1),size(mask_,2),size(mask_,3)) 
     164        mask_=mask__tmp 
     165      ENDIF 
     166       
    143167      IF (PRESENT(name_)) THEN 
    144168        CALL cxios_get_gridgroup_name(gridgroup_hdl%daddr, name_, len(name_)) 
  • XIOS/trunk/src/node/grid.cpp

    r369 r415  
    176176      this->solveDomainRef() ; 
    177177      this->solveAxisRef() ; 
     178         
    178179      if (context->hasClient) 
    179180      { 
    180           
     181         checkMask() ; 
    181182         this->computeIndex() ; 
    182183 
     
    190191   } 
    191192 
     193 
     194   void CGrid::checkMask(void) 
     195   { 
     196      using namespace std; 
     197 
     198      unsigned int niu = domain->ni, nju = domain->nj; 
     199      unsigned int nlu = 1 ; 
     200      if (hasAxis()) nlu=axis->size ; 
     201 
     202      if (!mask.isEmpty()) 
     203      { 
     204         if ((mask.extent(0) != niu) || 
     205             (mask.extent(1) != nju) || 
     206             (mask.extent(2) != nlu)) 
     207             ERROR("CGrid::checkAttributes(void)", 
     208                  <<"Le masque n'a pas la même taille que la grille locale") ; 
     209      } 
     210      else  
     211      { 
     212        mask.resize(niu,nju,nlu) ; 
     213        mask=true  ; 
     214      } 
     215      
     216      CArray<bool,2>& domainMask = domain->mask ; 
     217      for (int l=0; l < nlu ; l++) 
     218        for (int j=0; j < nju ; j++) 
     219          for(int i=0; i<niu ; i++) mask(i,j,l) = mask(i,j,l) && domainMask(i,j) ; 
     220         
     221       
     222   } 
     223    
    192224   //--------------------------------------------------------------- 
    193225 
     
    246278      CArray<int,1> data_i_index = domain->data_i_index ; 
    247279      CArray<int,1> data_j_index = domain->data_j_index ; 
    248        
    249  
    250       CArray<bool,2>& mask = domain->mask ; 
    251       CArray<int,2>& local_mask = domain->local_mask ; 
    252280       
    253281 
     
    268296            if ((l >=lbegin && l<= lend) && 
    269297                (i >= 0 && i < ni) && 
    270                 (j >= 0 && j < nj) && mask(i,j)) 
     298                (j >= 0 && j < nj) && mask(i,j,l)) 
    271299               indexCount++ ; 
    272300         } 
     
    298326            if ((l >= lbegin && l <= lend) && 
    299327                (i >= 0 && i < ni) && 
    300                 (j >= 0 && j < nj) && mask(i,j)) 
     328                (j >= 0 && j < nj) && mask(i,j,l)) 
    301329            { 
    302330               (*storeIndex[0])(indexCount) = count ; 
  • XIOS/trunk/src/node/grid.hpp

    r369 r415  
    152152         map<int, CArray<int, 1>* > out_j_fromClient ; 
    153153         map<int, CArray<int, 1>* > out_l_fromClient ; 
    154           
     154         void checkMask(void) ; 
    155155   }; // class CGrid 
    156156 
Note: See TracChangeset for help on using the changeset viewer.