Changeset 817


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

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

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

Test
+) On Curie
+) Test passes

Location:
XIOS/trunk/src
Files:
17 edited

Legend:

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

    r775 r817  
    1212 
    1313/* LOCAL */ 
    14 DECLARE_ARRAY(double, 1, value) 
     14DECLARE_ARRAY(double , 1   , value) 
     15DECLARE_ATTRIBUTE(StdString, axis_ref) 
    1516 
    16 DECLARE_ATTRIBUTE(StdString, axis_ref) 
     17DECLARE_ARRAY(int    ,1    , index) 
    1718 
    1819/* LOCAL */ 
    1920DECLARE_ATTRIBUTE(int,       data_n) 
    2021DECLARE_ATTRIBUTE(int,       data_begin) 
    21 DECLARE_ARRAY(int, 1 , data_index) 
     22DECLARE_ARRAY(int    ,  1 , data_index) 
    2223 
    2324/*LOCAL */ 
  • XIOS/trunk/src/config/grid_attribute.conf

    r791 r817  
    22DECLARE_ATTRIBUTE(StdString, description) 
    33 
    4 DECLARE_ARRAY(bool, 1, mask1) 
    5 DECLARE_ARRAY(bool, 2, mask2) 
    6 DECLARE_ARRAY(bool, 3, mask3) 
    7 //DECLARE_ARRAY(bool, 4, mask4) 
    8 //DECLARE_ARRAY(bool, 5, mask5) 
    9 //DECLARE_ARRAY(bool, 6, mask6) 
    10 //DECLARE_ARRAY(bool, 7, mask7) 
     4DECLARE_ARRAY(bool, 1, mask_1d) 
     5DECLARE_ARRAY(bool, 2, mask_2d) 
     6DECLARE_ARRAY(bool, 3, mask_3d) 
     7//DECLARE_ARRAY(bool, 4, mask_4d) 
     8//DECLARE_ARRAY(bool, 5, mask_5d) 
     9//DECLARE_ARRAY(bool, 6, mask_6d) 
     10//DECLARE_ARRAY(bool, 7, mask_7d) 
    1111 
    1212 
  • XIOS/trunk/src/distribution_client.cpp

    r668 r817  
    6464  switch (gridDim) { 
    6565    case 1: 
    66       readGridMaskInfo(grid->mask1); 
     66      readGridMaskInfo(grid->mask_1d); 
    6767      break; 
    6868    case 2: 
    69       readGridMaskInfo(grid->mask2); 
     69      readGridMaskInfo(grid->mask_2d); 
    7070      break; 
    7171    case 3: 
    72       readGridMaskInfo(grid->mask3); 
     72      readGridMaskInfo(grid->mask_3d); 
    7373      break; 
    7474    default: 
  • XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp

    r779 r817  
    163163 
    164164 
     165  void cxios_set_axis_index(axis_Ptr axis_hdl, int* index, int* extent) 
     166  { 
     167    CTimer::get("XIOS").resume(); 
     168    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData); 
     169    axis_hdl->index.reference(tmp.copy()); 
     170     CTimer::get("XIOS").suspend(); 
     171  } 
     172 
     173  void cxios_get_axis_index(axis_Ptr axis_hdl, int* index, int* extent) 
     174  { 
     175    CTimer::get("XIOS").resume(); 
     176    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData); 
     177    tmp=axis_hdl->index.getInheritedValue(); 
     178     CTimer::get("XIOS").suspend(); 
     179  } 
     180 
     181  bool cxios_is_defined_axis_index(axis_Ptr axis_hdl) 
     182  { 
     183     CTimer::get("XIOS").resume(); 
     184     bool isDefined = axis_hdl->index.hasInheritedValue(); 
     185     CTimer::get("XIOS").suspend(); 
     186     return isDefined; 
     187  } 
     188 
     189 
    165190  void cxios_set_axis_long_name(axis_Ptr axis_hdl, const char * long_name, int long_name_size) 
    166191  { 
  • XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp

    r779 r817  
    189189 
    190190 
     191  void cxios_set_axisgroup_index(axisgroup_Ptr axisgroup_hdl, int* index, int* extent) 
     192  { 
     193    CTimer::get("XIOS").resume(); 
     194    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData); 
     195    axisgroup_hdl->index.reference(tmp.copy()); 
     196     CTimer::get("XIOS").suspend(); 
     197  } 
     198 
     199  void cxios_get_axisgroup_index(axisgroup_Ptr axisgroup_hdl, int* index, int* extent) 
     200  { 
     201    CTimer::get("XIOS").resume(); 
     202    CArray<int,1> tmp(index, shape(extent[0]), neverDeleteData); 
     203    tmp=axisgroup_hdl->index.getInheritedValue(); 
     204     CTimer::get("XIOS").suspend(); 
     205  } 
     206 
     207  bool cxios_is_defined_axisgroup_index(axisgroup_Ptr axisgroup_hdl) 
     208  { 
     209     CTimer::get("XIOS").resume(); 
     210     bool isDefined = axisgroup_hdl->index.hasInheritedValue(); 
     211     CTimer::get("XIOS").suspend(); 
     212     return isDefined; 
     213  } 
     214 
     215 
    191216  void cxios_set_axisgroup_long_name(axisgroup_Ptr axisgroup_hdl, const char * long_name, int long_name_size) 
    192217  { 
  • XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp

    r791 r817  
    4444 
    4545 
    46   void cxios_set_grid_mask1(grid_Ptr grid_hdl, bool* mask1, int* extent) 
     46  void cxios_set_grid_mask_1d(grid_Ptr grid_hdl, bool* mask_1d, int* extent) 
    4747  { 
    4848    CTimer::get("XIOS").resume(); 
    49     CArray<bool,1> tmp(mask1, shape(extent[0]), neverDeleteData); 
    50     grid_hdl->mask1.reference(tmp.copy()); 
     49    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData); 
     50    grid_hdl->mask_1d.reference(tmp.copy()); 
    5151     CTimer::get("XIOS").suspend(); 
    5252  } 
    5353 
    54   void cxios_get_grid_mask1(grid_Ptr grid_hdl, bool* mask1, int* extent) 
     54  void cxios_get_grid_mask_1d(grid_Ptr grid_hdl, bool* mask_1d, int* extent) 
    5555  { 
    5656    CTimer::get("XIOS").resume(); 
    57     CArray<bool,1> tmp(mask1, shape(extent[0]), neverDeleteData); 
    58     tmp=grid_hdl->mask1.getInheritedValue(); 
     57    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData); 
     58    tmp=grid_hdl->mask_1d.getInheritedValue(); 
    5959     CTimer::get("XIOS").suspend(); 
    6060  } 
    6161 
    62   bool cxios_is_defined_grid_mask1(grid_Ptr grid_hdl) 
     62  bool cxios_is_defined_grid_mask_1d(grid_Ptr grid_hdl) 
    6363  { 
    6464     CTimer::get("XIOS").resume(); 
    65      bool isDefined = grid_hdl->mask1.hasInheritedValue(); 
     65     bool isDefined = grid_hdl->mask_1d.hasInheritedValue(); 
    6666     CTimer::get("XIOS").suspend(); 
    6767     return isDefined; 
     
    6969 
    7070 
    71   void cxios_set_grid_mask2(grid_Ptr grid_hdl, bool* mask2, int* extent) 
     71  void cxios_set_grid_mask_2d(grid_Ptr grid_hdl, bool* mask_2d, int* extent) 
    7272  { 
    7373    CTimer::get("XIOS").resume(); 
    74     CArray<bool,2> tmp(mask2, shape(extent[0], extent[1]), neverDeleteData); 
    75     grid_hdl->mask2.reference(tmp.copy()); 
     74    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData); 
     75    grid_hdl->mask_2d.reference(tmp.copy()); 
    7676     CTimer::get("XIOS").suspend(); 
    7777  } 
    7878 
    79   void cxios_get_grid_mask2(grid_Ptr grid_hdl, bool* mask2, int* extent) 
     79  void cxios_get_grid_mask_2d(grid_Ptr grid_hdl, bool* mask_2d, int* extent) 
    8080  { 
    8181    CTimer::get("XIOS").resume(); 
    82     CArray<bool,2> tmp(mask2, shape(extent[0], extent[1]), neverDeleteData); 
    83     tmp=grid_hdl->mask2.getInheritedValue(); 
     82    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData); 
     83    tmp=grid_hdl->mask_2d.getInheritedValue(); 
    8484     CTimer::get("XIOS").suspend(); 
    8585  } 
    8686 
    87   bool cxios_is_defined_grid_mask2(grid_Ptr grid_hdl) 
     87  bool cxios_is_defined_grid_mask_2d(grid_Ptr grid_hdl) 
    8888  { 
    8989     CTimer::get("XIOS").resume(); 
    90      bool isDefined = grid_hdl->mask2.hasInheritedValue(); 
     90     bool isDefined = grid_hdl->mask_2d.hasInheritedValue(); 
    9191     CTimer::get("XIOS").suspend(); 
    9292     return isDefined; 
     
    9494 
    9595 
    96   void cxios_set_grid_mask3(grid_Ptr grid_hdl, bool* mask3, int* extent) 
     96  void cxios_set_grid_mask_3d(grid_Ptr grid_hdl, bool* mask_3d, int* extent) 
    9797  { 
    9898    CTimer::get("XIOS").resume(); 
    99     CArray<bool,3> tmp(mask3, shape(extent[0], extent[1], extent[2]), neverDeleteData); 
    100     grid_hdl->mask3.reference(tmp.copy()); 
     99    CArray<bool,3> tmp(mask_3d, shape(extent[0], extent[1], extent[2]), neverDeleteData); 
     100    grid_hdl->mask_3d.reference(tmp.copy()); 
    101101     CTimer::get("XIOS").suspend(); 
    102102  } 
    103103 
    104   void cxios_get_grid_mask3(grid_Ptr grid_hdl, bool* mask3, int* extent) 
     104  void cxios_get_grid_mask_3d(grid_Ptr grid_hdl, bool* mask_3d, int* extent) 
    105105  { 
    106106    CTimer::get("XIOS").resume(); 
    107     CArray<bool,3> tmp(mask3, shape(extent[0], extent[1], extent[2]), neverDeleteData); 
    108     tmp=grid_hdl->mask3.getInheritedValue(); 
     107    CArray<bool,3> tmp(mask_3d, shape(extent[0], extent[1], extent[2]), neverDeleteData); 
     108    tmp=grid_hdl->mask_3d.getInheritedValue(); 
    109109     CTimer::get("XIOS").suspend(); 
    110110  } 
    111111 
    112   bool cxios_is_defined_grid_mask3(grid_Ptr grid_hdl) 
     112  bool cxios_is_defined_grid_mask_3d(grid_Ptr grid_hdl) 
    113113  { 
    114114     CTimer::get("XIOS").resume(); 
    115      bool isDefined = grid_hdl->mask3.hasInheritedValue(); 
     115     bool isDefined = grid_hdl->mask_3d.hasInheritedValue(); 
    116116     CTimer::get("XIOS").suspend(); 
    117117     return isDefined; 
  • XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp

    r791 r817  
    7070 
    7171 
    72   void cxios_set_gridgroup_mask1(gridgroup_Ptr gridgroup_hdl, bool* mask1, int* extent) 
     72  void cxios_set_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl, bool* mask_1d, int* extent) 
    7373  { 
    7474    CTimer::get("XIOS").resume(); 
    75     CArray<bool,1> tmp(mask1, shape(extent[0]), neverDeleteData); 
    76     gridgroup_hdl->mask1.reference(tmp.copy()); 
     75    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData); 
     76    gridgroup_hdl->mask_1d.reference(tmp.copy()); 
    7777     CTimer::get("XIOS").suspend(); 
    7878  } 
    7979 
    80   void cxios_get_gridgroup_mask1(gridgroup_Ptr gridgroup_hdl, bool* mask1, int* extent) 
     80  void cxios_get_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl, bool* mask_1d, int* extent) 
    8181  { 
    8282    CTimer::get("XIOS").resume(); 
    83     CArray<bool,1> tmp(mask1, shape(extent[0]), neverDeleteData); 
    84     tmp=gridgroup_hdl->mask1.getInheritedValue(); 
     83    CArray<bool,1> tmp(mask_1d, shape(extent[0]), neverDeleteData); 
     84    tmp=gridgroup_hdl->mask_1d.getInheritedValue(); 
    8585     CTimer::get("XIOS").suspend(); 
    8686  } 
    8787 
    88   bool cxios_is_defined_gridgroup_mask1(gridgroup_Ptr gridgroup_hdl) 
     88  bool cxios_is_defined_gridgroup_mask_1d(gridgroup_Ptr gridgroup_hdl) 
    8989  { 
    9090     CTimer::get("XIOS").resume(); 
    91      bool isDefined = gridgroup_hdl->mask1.hasInheritedValue(); 
     91     bool isDefined = gridgroup_hdl->mask_1d.hasInheritedValue(); 
    9292     CTimer::get("XIOS").suspend(); 
    9393     return isDefined; 
     
    9595 
    9696 
    97   void cxios_set_gridgroup_mask2(gridgroup_Ptr gridgroup_hdl, bool* mask2, int* extent) 
     97  void cxios_set_gridgroup_mask_2d(gridgroup_Ptr gridgroup_hdl, bool* mask_2d, int* extent) 
    9898  { 
    9999    CTimer::get("XIOS").resume(); 
    100     CArray<bool,2> tmp(mask2, shape(extent[0], extent[1]), neverDeleteData); 
    101     gridgroup_hdl->mask2.reference(tmp.copy()); 
     100    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData); 
     101    gridgroup_hdl->mask_2d.reference(tmp.copy()); 
    102102     CTimer::get("XIOS").suspend(); 
    103103  } 
    104104 
    105   void cxios_get_gridgroup_mask2(gridgroup_Ptr gridgroup_hdl, bool* mask2, int* extent) 
     105  void cxios_get_gridgroup_mask_2d(gridgroup_Ptr gridgroup_hdl, bool* mask_2d, int* extent) 
    106106  { 
    107107    CTimer::get("XIOS").resume(); 
    108     CArray<bool,2> tmp(mask2, shape(extent[0], extent[1]), neverDeleteData); 
    109     tmp=gridgroup_hdl->mask2.getInheritedValue(); 
     108    CArray<bool,2> tmp(mask_2d, shape(extent[0], extent[1]), neverDeleteData); 
     109    tmp=gridgroup_hdl->mask_2d.getInheritedValue(); 
    110110     CTimer::get("XIOS").suspend(); 
    111111  } 
    112112 
    113   bool cxios_is_defined_gridgroup_mask2(gridgroup_Ptr gridgroup_hdl) 
     113  bool cxios_is_defined_gridgroup_mask_2d(gridgroup_Ptr gridgroup_hdl) 
    114114  { 
    115115     CTimer::get("XIOS").resume(); 
    116      bool isDefined = gridgroup_hdl->mask2.hasInheritedValue(); 
     116     bool isDefined = gridgroup_hdl->mask_2d.hasInheritedValue(); 
    117117     CTimer::get("XIOS").suspend(); 
    118118     return isDefined; 
     
    120120 
    121121 
    122   void cxios_set_gridgroup_mask3(gridgroup_Ptr gridgroup_hdl, bool* mask3, int* extent) 
     122  void cxios_set_gridgroup_mask_3d(gridgroup_Ptr gridgroup_hdl, bool* mask_3d, int* extent) 
    123123  { 
    124124    CTimer::get("XIOS").resume(); 
    125     CArray<bool,3> tmp(mask3, shape(extent[0], extent[1], extent[2]), neverDeleteData); 
    126     gridgroup_hdl->mask3.reference(tmp.copy()); 
     125    CArray<bool,3> tmp(mask_3d, shape(extent[0], extent[1], extent[2]), neverDeleteData); 
     126    gridgroup_hdl->mask_3d.reference(tmp.copy()); 
    127127     CTimer::get("XIOS").suspend(); 
    128128  } 
    129129 
    130   void cxios_get_gridgroup_mask3(gridgroup_Ptr gridgroup_hdl, bool* mask3, int* extent) 
     130  void cxios_get_gridgroup_mask_3d(gridgroup_Ptr gridgroup_hdl, bool* mask_3d, int* extent) 
    131131  { 
    132132    CTimer::get("XIOS").resume(); 
    133     CArray<bool,3> tmp(mask3, shape(extent[0], extent[1], extent[2]), neverDeleteData); 
    134     tmp=gridgroup_hdl->mask3.getInheritedValue(); 
     133    CArray<bool,3> tmp(mask_3d, shape(extent[0], extent[1], extent[2]), neverDeleteData); 
     134    tmp=gridgroup_hdl->mask_3d.getInheritedValue(); 
    135135     CTimer::get("XIOS").suspend(); 
    136136  } 
    137137 
    138   bool cxios_is_defined_gridgroup_mask3(gridgroup_Ptr gridgroup_hdl) 
     138  bool cxios_is_defined_gridgroup_mask_3d(gridgroup_Ptr gridgroup_hdl) 
    139139  { 
    140140     CTimer::get("XIOS").resume(); 
    141      bool isDefined = gridgroup_hdl->mask3.hasInheritedValue(); 
     141     bool isDefined = gridgroup_hdl->mask_3d.hasInheritedValue(); 
    142142     CTimer::get("XIOS").suspend(); 
    143143     return isDefined; 
  • XIOS/trunk/src/interface/fortran_attr/axis_interface_attr.F90

    r779 r817  
    130130 
    131131 
     132    SUBROUTINE cxios_set_axis_index(axis_hdl, index, extent) BIND(C) 
     133      USE ISO_C_BINDING 
     134      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl 
     135      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index 
     136      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
     137    END SUBROUTINE cxios_set_axis_index 
     138 
     139    SUBROUTINE cxios_get_axis_index(axis_hdl, index, extent) BIND(C) 
     140      USE ISO_C_BINDING 
     141      INTEGER (kind = C_INTPTR_T), VALUE       :: axis_hdl 
     142      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index 
     143      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
     144    END SUBROUTINE cxios_get_axis_index 
     145 
     146    FUNCTION cxios_is_defined_axis_index(axis_hdl) BIND(C) 
     147      USE ISO_C_BINDING 
     148      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axis_index 
     149      INTEGER (kind = C_INTPTR_T), VALUE :: axis_hdl 
     150    END FUNCTION cxios_is_defined_axis_index 
     151 
     152 
    132153    SUBROUTINE cxios_set_axis_long_name(axis_hdl, long_name, long_name_size) BIND(C) 
    133154      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/axisgroup_interface_attr.F90

    r779 r817  
    151151 
    152152 
     153    SUBROUTINE cxios_set_axisgroup_index(axisgroup_hdl, index, extent) BIND(C) 
     154      USE ISO_C_BINDING 
     155      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl 
     156      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index 
     157      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
     158    END SUBROUTINE cxios_set_axisgroup_index 
     159 
     160    SUBROUTINE cxios_get_axisgroup_index(axisgroup_hdl, index, extent) BIND(C) 
     161      USE ISO_C_BINDING 
     162      INTEGER (kind = C_INTPTR_T), VALUE       :: axisgroup_hdl 
     163      INTEGER (KIND=C_INT)     , DIMENSION(*) :: index 
     164      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
     165    END SUBROUTINE cxios_get_axisgroup_index 
     166 
     167    FUNCTION cxios_is_defined_axisgroup_index(axisgroup_hdl) BIND(C) 
     168      USE ISO_C_BINDING 
     169      LOGICAL(kind=C_BOOL) :: cxios_is_defined_axisgroup_index 
     170      INTEGER (kind = C_INTPTR_T), VALUE :: axisgroup_hdl 
     171    END FUNCTION cxios_is_defined_axisgroup_index 
     172 
     173 
    153174    SUBROUTINE cxios_set_axisgroup_long_name(axisgroup_hdl, long_name, long_name_size) BIND(C) 
    154175      USE ISO_C_BINDING 
  • XIOS/trunk/src/interface/fortran_attr/grid_interface_attr.F90

    r791 r817  
    3131 
    3232 
    33     SUBROUTINE cxios_set_grid_mask1(grid_hdl, mask1, extent) BIND(C) 
     33    SUBROUTINE cxios_set_grid_mask_1d(grid_hdl, mask_1d, extent) BIND(C) 
    3434      USE ISO_C_BINDING 
    3535      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl 
    36       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask1 
     36      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d 
    3737      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    38     END SUBROUTINE cxios_set_grid_mask1 
     38    END SUBROUTINE cxios_set_grid_mask_1d 
    3939 
    40     SUBROUTINE cxios_get_grid_mask1(grid_hdl, mask1, extent) BIND(C) 
     40    SUBROUTINE cxios_get_grid_mask_1d(grid_hdl, mask_1d, extent) BIND(C) 
    4141      USE ISO_C_BINDING 
    4242      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl 
    43       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask1 
     43      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d 
    4444      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    45     END SUBROUTINE cxios_get_grid_mask1 
     45    END SUBROUTINE cxios_get_grid_mask_1d 
    4646 
    47     FUNCTION cxios_is_defined_grid_mask1(grid_hdl) BIND(C) 
     47    FUNCTION cxios_is_defined_grid_mask_1d(grid_hdl) BIND(C) 
    4848      USE ISO_C_BINDING 
    49       LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask1 
     49      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_1d 
    5050      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl 
    51     END FUNCTION cxios_is_defined_grid_mask1 
     51    END FUNCTION cxios_is_defined_grid_mask_1d 
    5252 
    5353 
    54     SUBROUTINE cxios_set_grid_mask2(grid_hdl, mask2, extent) BIND(C) 
     54    SUBROUTINE cxios_set_grid_mask_2d(grid_hdl, mask_2d, extent) BIND(C) 
    5555      USE ISO_C_BINDING 
    5656      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl 
    57       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask2 
     57      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d 
    5858      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    59     END SUBROUTINE cxios_set_grid_mask2 
     59    END SUBROUTINE cxios_set_grid_mask_2d 
    6060 
    61     SUBROUTINE cxios_get_grid_mask2(grid_hdl, mask2, extent) BIND(C) 
     61    SUBROUTINE cxios_get_grid_mask_2d(grid_hdl, mask_2d, extent) BIND(C) 
    6262      USE ISO_C_BINDING 
    6363      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl 
    64       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask2 
     64      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d 
    6565      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    66     END SUBROUTINE cxios_get_grid_mask2 
     66    END SUBROUTINE cxios_get_grid_mask_2d 
    6767 
    68     FUNCTION cxios_is_defined_grid_mask2(grid_hdl) BIND(C) 
     68    FUNCTION cxios_is_defined_grid_mask_2d(grid_hdl) BIND(C) 
    6969      USE ISO_C_BINDING 
    70       LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask2 
     70      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_2d 
    7171      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl 
    72     END FUNCTION cxios_is_defined_grid_mask2 
     72    END FUNCTION cxios_is_defined_grid_mask_2d 
    7373 
    7474 
    75     SUBROUTINE cxios_set_grid_mask3(grid_hdl, mask3, extent) BIND(C) 
     75    SUBROUTINE cxios_set_grid_mask_3d(grid_hdl, mask_3d, extent) BIND(C) 
    7676      USE ISO_C_BINDING 
    7777      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl 
    78       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask3 
     78      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_3d 
    7979      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    80     END SUBROUTINE cxios_set_grid_mask3 
     80    END SUBROUTINE cxios_set_grid_mask_3d 
    8181 
    82     SUBROUTINE cxios_get_grid_mask3(grid_hdl, mask3, extent) BIND(C) 
     82    SUBROUTINE cxios_get_grid_mask_3d(grid_hdl, mask_3d, extent) BIND(C) 
    8383      USE ISO_C_BINDING 
    8484      INTEGER (kind = C_INTPTR_T), VALUE       :: grid_hdl 
    85       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask3 
     85      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_3d 
    8686      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    87     END SUBROUTINE cxios_get_grid_mask3 
     87    END SUBROUTINE cxios_get_grid_mask_3d 
    8888 
    89     FUNCTION cxios_is_defined_grid_mask3(grid_hdl) BIND(C) 
     89    FUNCTION cxios_is_defined_grid_mask_3d(grid_hdl) BIND(C) 
    9090      USE ISO_C_BINDING 
    91       LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask3 
     91      LOGICAL(kind=C_BOOL) :: cxios_is_defined_grid_mask_3d 
    9292      INTEGER (kind = C_INTPTR_T), VALUE :: grid_hdl 
    93     END FUNCTION cxios_is_defined_grid_mask3 
     93    END FUNCTION cxios_is_defined_grid_mask_3d 
    9494 
    9595 
  • XIOS/trunk/src/interface/fortran_attr/gridgroup_interface_attr.F90

    r791 r817  
    5252 
    5353 
    54     SUBROUTINE cxios_set_gridgroup_mask1(gridgroup_hdl, mask1, extent) BIND(C) 
     54    SUBROUTINE cxios_set_gridgroup_mask_1d(gridgroup_hdl, mask_1d, extent) BIND(C) 
    5555      USE ISO_C_BINDING 
    5656      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl 
    57       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask1 
     57      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d 
    5858      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    59     END SUBROUTINE cxios_set_gridgroup_mask1 
     59    END SUBROUTINE cxios_set_gridgroup_mask_1d 
    6060 
    61     SUBROUTINE cxios_get_gridgroup_mask1(gridgroup_hdl, mask1, extent) BIND(C) 
     61    SUBROUTINE cxios_get_gridgroup_mask_1d(gridgroup_hdl, mask_1d, extent) BIND(C) 
    6262      USE ISO_C_BINDING 
    6363      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl 
    64       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask1 
     64      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_1d 
    6565      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    66     END SUBROUTINE cxios_get_gridgroup_mask1 
     66    END SUBROUTINE cxios_get_gridgroup_mask_1d 
    6767 
    68     FUNCTION cxios_is_defined_gridgroup_mask1(gridgroup_hdl) BIND(C) 
     68    FUNCTION cxios_is_defined_gridgroup_mask_1d(gridgroup_hdl) BIND(C) 
    6969      USE ISO_C_BINDING 
    70       LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask1 
     70      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_1d 
    7171      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl 
    72     END FUNCTION cxios_is_defined_gridgroup_mask1 
     72    END FUNCTION cxios_is_defined_gridgroup_mask_1d 
    7373 
    7474 
    75     SUBROUTINE cxios_set_gridgroup_mask2(gridgroup_hdl, mask2, extent) BIND(C) 
     75    SUBROUTINE cxios_set_gridgroup_mask_2d(gridgroup_hdl, mask_2d, extent) BIND(C) 
    7676      USE ISO_C_BINDING 
    7777      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl 
    78       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask2 
     78      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d 
    7979      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    80     END SUBROUTINE cxios_set_gridgroup_mask2 
     80    END SUBROUTINE cxios_set_gridgroup_mask_2d 
    8181 
    82     SUBROUTINE cxios_get_gridgroup_mask2(gridgroup_hdl, mask2, extent) BIND(C) 
     82    SUBROUTINE cxios_get_gridgroup_mask_2d(gridgroup_hdl, mask_2d, extent) BIND(C) 
    8383      USE ISO_C_BINDING 
    8484      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl 
    85       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask2 
     85      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_2d 
    8686      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    87     END SUBROUTINE cxios_get_gridgroup_mask2 
     87    END SUBROUTINE cxios_get_gridgroup_mask_2d 
    8888 
    89     FUNCTION cxios_is_defined_gridgroup_mask2(gridgroup_hdl) BIND(C) 
     89    FUNCTION cxios_is_defined_gridgroup_mask_2d(gridgroup_hdl) BIND(C) 
    9090      USE ISO_C_BINDING 
    91       LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask2 
     91      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_2d 
    9292      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl 
    93     END FUNCTION cxios_is_defined_gridgroup_mask2 
     93    END FUNCTION cxios_is_defined_gridgroup_mask_2d 
    9494 
    9595 
    96     SUBROUTINE cxios_set_gridgroup_mask3(gridgroup_hdl, mask3, extent) BIND(C) 
     96    SUBROUTINE cxios_set_gridgroup_mask_3d(gridgroup_hdl, mask_3d, extent) BIND(C) 
    9797      USE ISO_C_BINDING 
    9898      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl 
    99       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask3 
     99      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_3d 
    100100      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    101     END SUBROUTINE cxios_set_gridgroup_mask3 
     101    END SUBROUTINE cxios_set_gridgroup_mask_3d 
    102102 
    103     SUBROUTINE cxios_get_gridgroup_mask3(gridgroup_hdl, mask3, extent) BIND(C) 
     103    SUBROUTINE cxios_get_gridgroup_mask_3d(gridgroup_hdl, mask_3d, extent) BIND(C) 
    104104      USE ISO_C_BINDING 
    105105      INTEGER (kind = C_INTPTR_T), VALUE       :: gridgroup_hdl 
    106       LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask3 
     106      LOGICAL (KIND=C_BOOL)     , DIMENSION(*) :: mask_3d 
    107107      INTEGER (kind = C_INT), DIMENSION(*)     :: extent 
    108     END SUBROUTINE cxios_get_gridgroup_mask3 
     108    END SUBROUTINE cxios_get_gridgroup_mask_3d 
    109109 
    110     FUNCTION cxios_is_defined_gridgroup_mask3(gridgroup_hdl) BIND(C) 
     110    FUNCTION cxios_is_defined_gridgroup_mask_3d(gridgroup_hdl) BIND(C) 
    111111      USE ISO_C_BINDING 
    112       LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask3 
     112      LOGICAL(kind=C_BOOL) :: cxios_is_defined_gridgroup_mask_3d 
    113113      INTEGER (kind = C_INTPTR_T), VALUE :: gridgroup_hdl 
    114     END FUNCTION cxios_is_defined_gridgroup_mask3 
     114    END FUNCTION cxios_is_defined_gridgroup_mask_3d 
    115115 
    116116 
  • XIOS/trunk/src/interface/fortran_attr/iaxis_attr.F90

    r779 r817  
    1212 
    1313  SUBROUTINE xios(set_axis_attr)  & 
    14     ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    15     , n_glo, name, positive, standard_name, unit, value ) 
     14    ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask, n  & 
     15    , n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    1616 
    1717    IMPLICIT NONE 
     
    2424      INTEGER  , OPTIONAL, INTENT(IN) :: data_index(:) 
    2525      INTEGER  , OPTIONAL, INTENT(IN) :: data_n 
     26      INTEGER  , OPTIONAL, INTENT(IN) :: index(:) 
    2627      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 
    2728      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:) 
     
    3839      CALL xios(get_axis_handle)(axis_id,axis_hdl) 
    3940      CALL xios(set_axis_attr_hdl_)   & 
    40       ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    41       , n_glo, name, positive, standard_name, unit, value ) 
     41      ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask  & 
     42      , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    4243 
    4344  END SUBROUTINE xios(set_axis_attr) 
    4445 
    4546  SUBROUTINE xios(set_axis_attr_hdl)  & 
    46     ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    47     , n_glo, name, positive, standard_name, unit, value ) 
     47    ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask  & 
     48    , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    4849 
    4950    IMPLICIT NONE 
     
    5556      INTEGER  , OPTIONAL, INTENT(IN) :: data_index(:) 
    5657      INTEGER  , OPTIONAL, INTENT(IN) :: data_n 
     58      INTEGER  , OPTIONAL, INTENT(IN) :: index(:) 
    5759      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 
    5860      LOGICAL  , OPTIONAL, INTENT(IN) :: mask(:) 
     
    6870 
    6971      CALL xios(set_axis_attr_hdl_)  & 
    70       ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    71       , n_glo, name, positive, standard_name, unit, value ) 
     72      ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask  & 
     73      , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    7274 
    7375  END SUBROUTINE xios(set_axis_attr_hdl) 
    7476 
    7577  SUBROUTINE xios(set_axis_attr_hdl_)   & 
    76     ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, long_name_, mask_  & 
    77     , n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_ ) 
     78    ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, index_, long_name_  & 
     79    , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_  & 
     80     ) 
    7881 
    7982    IMPLICIT NONE 
     
    8588      INTEGER  , OPTIONAL, INTENT(IN) :: data_index_(:) 
    8689      INTEGER  , OPTIONAL, INTENT(IN) :: data_n_ 
     90      INTEGER  , OPTIONAL, INTENT(IN) :: index_(:) 
    8791      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_ 
    8892      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_(:) 
     
    121125      ENDIF 
    122126 
     127      IF (PRESENT(index_)) THEN 
     128        CALL cxios_set_axis_index(axis_hdl%daddr, index_, SHAPE(index_)) 
     129      ENDIF 
     130 
    123131      IF (PRESENT(long_name_)) THEN 
    124132        CALL cxios_set_axis_long_name(axis_hdl%daddr, long_name_, len(long_name_)) 
     
    166174 
    167175  SUBROUTINE xios(get_axis_attr)  & 
    168     ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    169     , n_glo, name, positive, standard_name, unit, value ) 
     176    ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask, n  & 
     177    , n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    170178 
    171179    IMPLICIT NONE 
     
    178186      INTEGER  , OPTIONAL, INTENT(OUT) :: data_index(:) 
    179187      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n 
     188      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:) 
    180189      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 
    181190      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:) 
     
    192201      CALL xios(get_axis_handle)(axis_id,axis_hdl) 
    193202      CALL xios(get_axis_attr_hdl_)   & 
    194       ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    195       , n_glo, name, positive, standard_name, unit, value ) 
     203      ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask  & 
     204      , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    196205 
    197206  END SUBROUTINE xios(get_axis_attr) 
    198207 
    199208  SUBROUTINE xios(get_axis_attr_hdl)  & 
    200     ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    201     , n_glo, name, positive, standard_name, unit, value ) 
     209    ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask  & 
     210    , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    202211 
    203212    IMPLICIT NONE 
     
    209218      INTEGER  , OPTIONAL, INTENT(OUT) :: data_index(:) 
    210219      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n 
     220      INTEGER  , OPTIONAL, INTENT(OUT) :: index(:) 
    211221      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 
    212222      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask(:) 
     
    222232 
    223233      CALL xios(get_axis_attr_hdl_)  & 
    224       ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    225       , n_glo, name, positive, standard_name, unit, value ) 
     234      ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask  & 
     235      , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    226236 
    227237  END SUBROUTINE xios(get_axis_attr_hdl) 
    228238 
    229239  SUBROUTINE xios(get_axis_attr_hdl_)   & 
    230     ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, long_name_, mask_  & 
    231     , n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_ ) 
     240    ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, index_, long_name_  & 
     241    , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_  & 
     242     ) 
    232243 
    233244    IMPLICIT NONE 
     
    239250      INTEGER  , OPTIONAL, INTENT(OUT) :: data_index_(:) 
    240251      INTEGER  , OPTIONAL, INTENT(OUT) :: data_n_ 
     252      INTEGER  , OPTIONAL, INTENT(OUT) :: index_(:) 
    241253      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_ 
    242254      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_(:) 
     
    275287      ENDIF 
    276288 
     289      IF (PRESENT(index_)) THEN 
     290        CALL cxios_get_axis_index(axis_hdl%daddr, index_, SHAPE(index_)) 
     291      ENDIF 
     292 
    277293      IF (PRESENT(long_name_)) THEN 
    278294        CALL cxios_get_axis_long_name(axis_hdl%daddr, long_name_, len(long_name_)) 
     
    320336 
    321337  SUBROUTINE xios(is_defined_axis_attr)  & 
    322     ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    323     , n_glo, name, positive, standard_name, unit, value ) 
     338    ( axis_id, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask, n  & 
     339    , n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    324340 
    325341    IMPLICIT NONE 
     
    338354      LOGICAL, OPTIONAL, INTENT(OUT) :: data_n 
    339355      LOGICAL(KIND=C_BOOL) :: data_n_tmp 
     356      LOGICAL, OPTIONAL, INTENT(OUT) :: index 
     357      LOGICAL(KIND=C_BOOL) :: index_tmp 
    340358      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name 
    341359      LOGICAL(KIND=C_BOOL) :: long_name_tmp 
     
    361379      CALL xios(get_axis_handle)(axis_id,axis_hdl) 
    362380      CALL xios(is_defined_axis_attr_hdl_)   & 
    363       ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    364       , n_glo, name, positive, standard_name, unit, value ) 
     381      ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask  & 
     382      , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    365383 
    366384  END SUBROUTINE xios(is_defined_axis_attr) 
    367385 
    368386  SUBROUTINE xios(is_defined_axis_attr_hdl)  & 
    369     ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    370     , n_glo, name, positive, standard_name, unit, value ) 
     387    ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask  & 
     388    , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    371389 
    372390    IMPLICIT NONE 
     
    384402      LOGICAL, OPTIONAL, INTENT(OUT) :: data_n 
    385403      LOGICAL(KIND=C_BOOL) :: data_n_tmp 
     404      LOGICAL, OPTIONAL, INTENT(OUT) :: index 
     405      LOGICAL(KIND=C_BOOL) :: index_tmp 
    386406      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name 
    387407      LOGICAL(KIND=C_BOOL) :: long_name_tmp 
     
    406426 
    407427      CALL xios(is_defined_axis_attr_hdl_)  & 
    408       ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, long_name, mask, n, n_distributed_partition  & 
    409       , n_glo, name, positive, standard_name, unit, value ) 
     428      ( axis_hdl, axis_ref, begin, bounds, data_begin, data_index, data_n, index, long_name, mask  & 
     429      , n, n_distributed_partition, n_glo, name, positive, standard_name, unit, value ) 
    410430 
    411431  END SUBROUTINE xios(is_defined_axis_attr_hdl) 
    412432 
    413433  SUBROUTINE xios(is_defined_axis_attr_hdl_)   & 
    414     ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, long_name_, mask_  & 
    415     , n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_ ) 
     434    ( axis_hdl, axis_ref_, begin_, bounds_, data_begin_, data_index_, data_n_, index_, long_name_  & 
     435    , mask_, n_, n_distributed_partition_, n_glo_, name_, positive_, standard_name_, unit_, value_  & 
     436     ) 
    416437 
    417438    IMPLICIT NONE 
     
    429450      LOGICAL, OPTIONAL, INTENT(OUT) :: data_n_ 
    430451      LOGICAL(KIND=C_BOOL) :: data_n__tmp 
     452      LOGICAL, OPTIONAL, INTENT(OUT) :: index_ 
     453      LOGICAL(KIND=C_BOOL) :: index__tmp 
    431454      LOGICAL, OPTIONAL, INTENT(OUT) :: long_name_ 
    432455      LOGICAL(KIND=C_BOOL) :: long_name__tmp 
     
    480503      ENDIF 
    481504 
     505      IF (PRESENT(index_)) THEN 
     506        index__tmp = cxios_is_defined_axis_index(axis_hdl%daddr) 
     507        index_ = index__tmp 
     508      ENDIF 
     509 
    482510      IF (PRESENT(long_name_)) THEN 
    483511        long_name__tmp = cxios_is_defined_axis_long_name(axis_hdl%daddr) 
  • XIOS/trunk/src/interface/fortran_attr/iaxisgroup_attr.F90

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

    r791 r817  
    1212 
    1313  SUBROUTINE xios(set_grid_attr)  & 
    14     ( grid_id, description, mask1, mask2, mask3, name ) 
     14    ( grid_id, description, mask_1d, mask_2d, mask_3d, name ) 
    1515 
    1616    IMPLICIT NONE 
     
    1818      CHARACTER(LEN=*), INTENT(IN) ::grid_id 
    1919      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description 
    20       LOGICAL  , OPTIONAL, INTENT(IN) :: mask1(:) 
    21       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:) 
    22       LOGICAL  , OPTIONAL, INTENT(IN) :: mask2(:,:) 
    23       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:) 
    24       LOGICAL  , OPTIONAL, INTENT(IN) :: mask3(:,:,:) 
    25       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:) 
     20      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:) 
     21      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:) 
     22      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:) 
     23      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:) 
     24      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d(:,:,:) 
     25      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:) 
    2626      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    2727 
    2828      CALL xios(get_grid_handle)(grid_id,grid_hdl) 
    2929      CALL xios(set_grid_attr_hdl_)   & 
    30       ( grid_hdl, description, mask1, mask2, mask3, name ) 
     30      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name ) 
    3131 
    3232  END SUBROUTINE xios(set_grid_attr) 
    3333 
    3434  SUBROUTINE xios(set_grid_attr_hdl)  & 
    35     ( grid_hdl, description, mask1, mask2, mask3, name ) 
     35    ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name ) 
    3636 
    3737    IMPLICIT NONE 
    3838      TYPE(txios(grid)) , INTENT(IN) :: grid_hdl 
    3939      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description 
    40       LOGICAL  , OPTIONAL, INTENT(IN) :: mask1(:) 
    41       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:) 
    42       LOGICAL  , OPTIONAL, INTENT(IN) :: mask2(:,:) 
    43       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:) 
    44       LOGICAL  , OPTIONAL, INTENT(IN) :: mask3(:,:,:) 
    45       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:) 
     40      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:) 
     41      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:) 
     42      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:) 
     43      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:) 
     44      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d(:,:,:) 
     45      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:) 
    4646      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    4747 
    4848      CALL xios(set_grid_attr_hdl_)  & 
    49       ( grid_hdl, description, mask1, mask2, mask3, name ) 
     49      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name ) 
    5050 
    5151  END SUBROUTINE xios(set_grid_attr_hdl) 
    5252 
    5353  SUBROUTINE xios(set_grid_attr_hdl_)   & 
    54     ( grid_hdl, description_, mask1_, mask2_, mask3_, name_ ) 
     54    ( grid_hdl, description_, mask_1d_, mask_2d_, mask_3d_, name_ ) 
    5555 
    5656    IMPLICIT NONE 
    5757      TYPE(txios(grid)) , INTENT(IN) :: grid_hdl 
    5858      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description_ 
    59       LOGICAL  , OPTIONAL, INTENT(IN) :: mask1_(:) 
    60       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1__tmp(:) 
    61       LOGICAL  , OPTIONAL, INTENT(IN) :: mask2_(:,:) 
    62       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2__tmp(:,:) 
    63       LOGICAL  , OPTIONAL, INTENT(IN) :: mask3_(:,:,:) 
    64       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3__tmp(:,:,:) 
     59      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d_(:) 
     60      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:) 
     61      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d_(:,:) 
     62      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:) 
     63      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d_(:,:,:) 
     64      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d__tmp(:,:,:) 
    6565      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
    6666 
     
    6969      ENDIF 
    7070 
    71       IF (PRESENT(mask1_)) THEN 
    72         ALLOCATE(mask1__tmp(SIZE(mask1_,1))) 
    73         mask1__tmp = mask1_ 
    74         CALL cxios_set_grid_mask1(grid_hdl%daddr, mask1__tmp, SHAPE(mask1_)) 
    75       ENDIF 
    76  
    77       IF (PRESENT(mask2_)) THEN 
    78         ALLOCATE(mask2__tmp(SIZE(mask2_,1), SIZE(mask2_,2))) 
    79         mask2__tmp = mask2_ 
    80         CALL cxios_set_grid_mask2(grid_hdl%daddr, mask2__tmp, SHAPE(mask2_)) 
    81       ENDIF 
    82  
    83       IF (PRESENT(mask3_)) THEN 
    84         ALLOCATE(mask3__tmp(SIZE(mask3_,1), SIZE(mask3_,2), SIZE(mask3_,3))) 
    85         mask3__tmp = mask3_ 
    86         CALL cxios_set_grid_mask3(grid_hdl%daddr, mask3__tmp, SHAPE(mask3_)) 
     71      IF (PRESENT(mask_1d_)) THEN 
     72        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1))) 
     73        mask_1d__tmp = mask_1d_ 
     74        CALL cxios_set_grid_mask_1d(grid_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_)) 
     75      ENDIF 
     76 
     77      IF (PRESENT(mask_2d_)) THEN 
     78        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2))) 
     79        mask_2d__tmp = mask_2d_ 
     80        CALL cxios_set_grid_mask_2d(grid_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_)) 
     81      ENDIF 
     82 
     83      IF (PRESENT(mask_3d_)) THEN 
     84        ALLOCATE(mask_3d__tmp(SIZE(mask_3d_,1), SIZE(mask_3d_,2), SIZE(mask_3d_,3))) 
     85        mask_3d__tmp = mask_3d_ 
     86        CALL cxios_set_grid_mask_3d(grid_hdl%daddr, mask_3d__tmp, SHAPE(mask_3d_)) 
    8787      ENDIF 
    8888 
     
    9494 
    9595  SUBROUTINE xios(get_grid_attr)  & 
    96     ( grid_id, description, mask1, mask2, mask3, name ) 
     96    ( grid_id, description, mask_1d, mask_2d, mask_3d, name ) 
    9797 
    9898    IMPLICIT NONE 
     
    100100      CHARACTER(LEN=*), INTENT(IN) ::grid_id 
    101101      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description 
    102       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1(:) 
    103       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:) 
    104       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2(:,:) 
    105       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:) 
    106       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3(:,:,:) 
    107       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:) 
     102      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:) 
     103      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:) 
     104      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:) 
     105      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:) 
     106      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d(:,:,:) 
     107      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:) 
    108108      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    109109 
    110110      CALL xios(get_grid_handle)(grid_id,grid_hdl) 
    111111      CALL xios(get_grid_attr_hdl_)   & 
    112       ( grid_hdl, description, mask1, mask2, mask3, name ) 
     112      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name ) 
    113113 
    114114  END SUBROUTINE xios(get_grid_attr) 
    115115 
    116116  SUBROUTINE xios(get_grid_attr_hdl)  & 
    117     ( grid_hdl, description, mask1, mask2, mask3, name ) 
     117    ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name ) 
    118118 
    119119    IMPLICIT NONE 
    120120      TYPE(txios(grid)) , INTENT(IN) :: grid_hdl 
    121121      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description 
    122       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1(:) 
    123       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:) 
    124       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2(:,:) 
    125       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:) 
    126       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3(:,:,:) 
    127       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:) 
     122      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:) 
     123      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:) 
     124      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:) 
     125      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:) 
     126      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d(:,:,:) 
     127      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:) 
    128128      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    129129 
    130130      CALL xios(get_grid_attr_hdl_)  & 
    131       ( grid_hdl, description, mask1, mask2, mask3, name ) 
     131      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name ) 
    132132 
    133133  END SUBROUTINE xios(get_grid_attr_hdl) 
    134134 
    135135  SUBROUTINE xios(get_grid_attr_hdl_)   & 
    136     ( grid_hdl, description_, mask1_, mask2_, mask3_, name_ ) 
     136    ( grid_hdl, description_, mask_1d_, mask_2d_, mask_3d_, name_ ) 
    137137 
    138138    IMPLICIT NONE 
    139139      TYPE(txios(grid)) , INTENT(IN) :: grid_hdl 
    140140      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description_ 
    141       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1_(:) 
    142       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1__tmp(:) 
    143       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2_(:,:) 
    144       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2__tmp(:,:) 
    145       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3_(:,:,:) 
    146       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3__tmp(:,:,:) 
     141      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d_(:) 
     142      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:) 
     143      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d_(:,:) 
     144      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:) 
     145      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d_(:,:,:) 
     146      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d__tmp(:,:,:) 
    147147      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
    148148 
     
    151151      ENDIF 
    152152 
    153       IF (PRESENT(mask1_)) THEN 
    154         ALLOCATE(mask1__tmp(SIZE(mask1_,1))) 
    155         CALL cxios_get_grid_mask1(grid_hdl%daddr, mask1__tmp, SHAPE(mask1_)) 
    156         mask1_ = mask1__tmp 
    157       ENDIF 
    158  
    159       IF (PRESENT(mask2_)) THEN 
    160         ALLOCATE(mask2__tmp(SIZE(mask2_,1), SIZE(mask2_,2))) 
    161         CALL cxios_get_grid_mask2(grid_hdl%daddr, mask2__tmp, SHAPE(mask2_)) 
    162         mask2_ = mask2__tmp 
    163       ENDIF 
    164  
    165       IF (PRESENT(mask3_)) THEN 
    166         ALLOCATE(mask3__tmp(SIZE(mask3_,1), SIZE(mask3_,2), SIZE(mask3_,3))) 
    167         CALL cxios_get_grid_mask3(grid_hdl%daddr, mask3__tmp, SHAPE(mask3_)) 
    168         mask3_ = mask3__tmp 
     153      IF (PRESENT(mask_1d_)) THEN 
     154        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1))) 
     155        CALL cxios_get_grid_mask_1d(grid_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_)) 
     156        mask_1d_ = mask_1d__tmp 
     157      ENDIF 
     158 
     159      IF (PRESENT(mask_2d_)) THEN 
     160        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2))) 
     161        CALL cxios_get_grid_mask_2d(grid_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_)) 
     162        mask_2d_ = mask_2d__tmp 
     163      ENDIF 
     164 
     165      IF (PRESENT(mask_3d_)) THEN 
     166        ALLOCATE(mask_3d__tmp(SIZE(mask_3d_,1), SIZE(mask_3d_,2), SIZE(mask_3d_,3))) 
     167        CALL cxios_get_grid_mask_3d(grid_hdl%daddr, mask_3d__tmp, SHAPE(mask_3d_)) 
     168        mask_3d_ = mask_3d__tmp 
    169169      ENDIF 
    170170 
     
    176176 
    177177  SUBROUTINE xios(is_defined_grid_attr)  & 
    178     ( grid_id, description, mask1, mask2, mask3, name ) 
     178    ( grid_id, description, mask_1d, mask_2d, mask_3d, name ) 
    179179 
    180180    IMPLICIT NONE 
     
    183183      LOGICAL, OPTIONAL, INTENT(OUT) :: description 
    184184      LOGICAL(KIND=C_BOOL) :: description_tmp 
    185       LOGICAL, OPTIONAL, INTENT(OUT) :: mask1 
    186       LOGICAL(KIND=C_BOOL) :: mask1_tmp 
    187       LOGICAL, OPTIONAL, INTENT(OUT) :: mask2 
    188       LOGICAL(KIND=C_BOOL) :: mask2_tmp 
    189       LOGICAL, OPTIONAL, INTENT(OUT) :: mask3 
    190       LOGICAL(KIND=C_BOOL) :: mask3_tmp 
     185      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d 
     186      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp 
     187      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d 
     188      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp 
     189      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d 
     190      LOGICAL(KIND=C_BOOL) :: mask_3d_tmp 
    191191      LOGICAL, OPTIONAL, INTENT(OUT) :: name 
    192192      LOGICAL(KIND=C_BOOL) :: name_tmp 
     
    194194      CALL xios(get_grid_handle)(grid_id,grid_hdl) 
    195195      CALL xios(is_defined_grid_attr_hdl_)   & 
    196       ( grid_hdl, description, mask1, mask2, mask3, name ) 
     196      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name ) 
    197197 
    198198  END SUBROUTINE xios(is_defined_grid_attr) 
    199199 
    200200  SUBROUTINE xios(is_defined_grid_attr_hdl)  & 
    201     ( grid_hdl, description, mask1, mask2, mask3, name ) 
     201    ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name ) 
    202202 
    203203    IMPLICIT NONE 
     
    205205      LOGICAL, OPTIONAL, INTENT(OUT) :: description 
    206206      LOGICAL(KIND=C_BOOL) :: description_tmp 
    207       LOGICAL, OPTIONAL, INTENT(OUT) :: mask1 
    208       LOGICAL(KIND=C_BOOL) :: mask1_tmp 
    209       LOGICAL, OPTIONAL, INTENT(OUT) :: mask2 
    210       LOGICAL(KIND=C_BOOL) :: mask2_tmp 
    211       LOGICAL, OPTIONAL, INTENT(OUT) :: mask3 
    212       LOGICAL(KIND=C_BOOL) :: mask3_tmp 
     207      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d 
     208      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp 
     209      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d 
     210      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp 
     211      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d 
     212      LOGICAL(KIND=C_BOOL) :: mask_3d_tmp 
    213213      LOGICAL, OPTIONAL, INTENT(OUT) :: name 
    214214      LOGICAL(KIND=C_BOOL) :: name_tmp 
    215215 
    216216      CALL xios(is_defined_grid_attr_hdl_)  & 
    217       ( grid_hdl, description, mask1, mask2, mask3, name ) 
     217      ( grid_hdl, description, mask_1d, mask_2d, mask_3d, name ) 
    218218 
    219219  END SUBROUTINE xios(is_defined_grid_attr_hdl) 
    220220 
    221221  SUBROUTINE xios(is_defined_grid_attr_hdl_)   & 
    222     ( grid_hdl, description_, mask1_, mask2_, mask3_, name_ ) 
     222    ( grid_hdl, description_, mask_1d_, mask_2d_, mask_3d_, name_ ) 
    223223 
    224224    IMPLICIT NONE 
     
    226226      LOGICAL, OPTIONAL, INTENT(OUT) :: description_ 
    227227      LOGICAL(KIND=C_BOOL) :: description__tmp 
    228       LOGICAL, OPTIONAL, INTENT(OUT) :: mask1_ 
    229       LOGICAL(KIND=C_BOOL) :: mask1__tmp 
    230       LOGICAL, OPTIONAL, INTENT(OUT) :: mask2_ 
    231       LOGICAL(KIND=C_BOOL) :: mask2__tmp 
    232       LOGICAL, OPTIONAL, INTENT(OUT) :: mask3_ 
    233       LOGICAL(KIND=C_BOOL) :: mask3__tmp 
     228      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d_ 
     229      LOGICAL(KIND=C_BOOL) :: mask_1d__tmp 
     230      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d_ 
     231      LOGICAL(KIND=C_BOOL) :: mask_2d__tmp 
     232      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d_ 
     233      LOGICAL(KIND=C_BOOL) :: mask_3d__tmp 
    234234      LOGICAL, OPTIONAL, INTENT(OUT) :: name_ 
    235235      LOGICAL(KIND=C_BOOL) :: name__tmp 
     
    240240      ENDIF 
    241241 
    242       IF (PRESENT(mask1_)) THEN 
    243         mask1__tmp = cxios_is_defined_grid_mask1(grid_hdl%daddr) 
    244         mask1_ = mask1__tmp 
    245       ENDIF 
    246  
    247       IF (PRESENT(mask2_)) THEN 
    248         mask2__tmp = cxios_is_defined_grid_mask2(grid_hdl%daddr) 
    249         mask2_ = mask2__tmp 
    250       ENDIF 
    251  
    252       IF (PRESENT(mask3_)) THEN 
    253         mask3__tmp = cxios_is_defined_grid_mask3(grid_hdl%daddr) 
    254         mask3_ = mask3__tmp 
     242      IF (PRESENT(mask_1d_)) THEN 
     243        mask_1d__tmp = cxios_is_defined_grid_mask_1d(grid_hdl%daddr) 
     244        mask_1d_ = mask_1d__tmp 
     245      ENDIF 
     246 
     247      IF (PRESENT(mask_2d_)) THEN 
     248        mask_2d__tmp = cxios_is_defined_grid_mask_2d(grid_hdl%daddr) 
     249        mask_2d_ = mask_2d__tmp 
     250      ENDIF 
     251 
     252      IF (PRESENT(mask_3d_)) THEN 
     253        mask_3d__tmp = cxios_is_defined_grid_mask_3d(grid_hdl%daddr) 
     254        mask_3d_ = mask_3d__tmp 
    255255      ENDIF 
    256256 
  • XIOS/trunk/src/interface/fortran_attr/igridgroup_attr.F90

    r791 r817  
    1212 
    1313  SUBROUTINE xios(set_gridgroup_attr)  & 
    14     ( gridgroup_id, description, group_ref, mask1, mask2, mask3, name ) 
     14    ( gridgroup_id, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    1515 
    1616    IMPLICIT NONE 
     
    1919      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description 
    2020      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
    21       LOGICAL  , OPTIONAL, INTENT(IN) :: mask1(:) 
    22       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:) 
    23       LOGICAL  , OPTIONAL, INTENT(IN) :: mask2(:,:) 
    24       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:) 
    25       LOGICAL  , OPTIONAL, INTENT(IN) :: mask3(:,:,:) 
    26       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:) 
     21      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:) 
     22      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:) 
     23      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:) 
     24      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:) 
     25      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d(:,:,:) 
     26      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:) 
    2727      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    2828 
    2929      CALL xios(get_gridgroup_handle)(gridgroup_id,gridgroup_hdl) 
    3030      CALL xios(set_gridgroup_attr_hdl_)   & 
    31       ( gridgroup_hdl, description, group_ref, mask1, mask2, mask3, name ) 
     31      ( gridgroup_hdl, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    3232 
    3333  END SUBROUTINE xios(set_gridgroup_attr) 
    3434 
    3535  SUBROUTINE xios(set_gridgroup_attr_hdl)  & 
    36     ( gridgroup_hdl, description, group_ref, mask1, mask2, mask3, name ) 
     36    ( gridgroup_hdl, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    3737 
    3838    IMPLICIT NONE 
     
    4040      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description 
    4141      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 
    42       LOGICAL  , OPTIONAL, INTENT(IN) :: mask1(:) 
    43       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:) 
    44       LOGICAL  , OPTIONAL, INTENT(IN) :: mask2(:,:) 
    45       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:) 
    46       LOGICAL  , OPTIONAL, INTENT(IN) :: mask3(:,:,:) 
    47       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:) 
     42      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d(:) 
     43      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:) 
     44      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d(:,:) 
     45      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:) 
     46      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d(:,:,:) 
     47      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:) 
    4848      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 
    4949 
    5050      CALL xios(set_gridgroup_attr_hdl_)  & 
    51       ( gridgroup_hdl, description, group_ref, mask1, mask2, mask3, name ) 
     51      ( gridgroup_hdl, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    5252 
    5353  END SUBROUTINE xios(set_gridgroup_attr_hdl) 
    5454 
    5555  SUBROUTINE xios(set_gridgroup_attr_hdl_)   & 
    56     ( gridgroup_hdl, description_, group_ref_, mask1_, mask2_, mask3_, name_ ) 
     56    ( gridgroup_hdl, description_, group_ref_, mask_1d_, mask_2d_, mask_3d_, name_ ) 
    5757 
    5858    IMPLICIT NONE 
     
    6060      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description_ 
    6161      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_ 
    62       LOGICAL  , OPTIONAL, INTENT(IN) :: mask1_(:) 
    63       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1__tmp(:) 
    64       LOGICAL  , OPTIONAL, INTENT(IN) :: mask2_(:,:) 
    65       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2__tmp(:,:) 
    66       LOGICAL  , OPTIONAL, INTENT(IN) :: mask3_(:,:,:) 
    67       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3__tmp(:,:,:) 
     62      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_1d_(:) 
     63      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:) 
     64      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_2d_(:,:) 
     65      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:) 
     66      LOGICAL  , OPTIONAL, INTENT(IN) :: mask_3d_(:,:,:) 
     67      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d__tmp(:,:,:) 
    6868      CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 
    6969 
     
    7676      ENDIF 
    7777 
    78       IF (PRESENT(mask1_)) THEN 
    79         ALLOCATE(mask1__tmp(SIZE(mask1_,1))) 
    80         mask1__tmp = mask1_ 
    81         CALL cxios_set_gridgroup_mask1(gridgroup_hdl%daddr, mask1__tmp, SHAPE(mask1_)) 
    82       ENDIF 
    83  
    84       IF (PRESENT(mask2_)) THEN 
    85         ALLOCATE(mask2__tmp(SIZE(mask2_,1), SIZE(mask2_,2))) 
    86         mask2__tmp = mask2_ 
    87         CALL cxios_set_gridgroup_mask2(gridgroup_hdl%daddr, mask2__tmp, SHAPE(mask2_)) 
    88       ENDIF 
    89  
    90       IF (PRESENT(mask3_)) THEN 
    91         ALLOCATE(mask3__tmp(SIZE(mask3_,1), SIZE(mask3_,2), SIZE(mask3_,3))) 
    92         mask3__tmp = mask3_ 
    93         CALL cxios_set_gridgroup_mask3(gridgroup_hdl%daddr, mask3__tmp, SHAPE(mask3_)) 
     78      IF (PRESENT(mask_1d_)) THEN 
     79        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1))) 
     80        mask_1d__tmp = mask_1d_ 
     81        CALL cxios_set_gridgroup_mask_1d(gridgroup_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_)) 
     82      ENDIF 
     83 
     84      IF (PRESENT(mask_2d_)) THEN 
     85        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2))) 
     86        mask_2d__tmp = mask_2d_ 
     87        CALL cxios_set_gridgroup_mask_2d(gridgroup_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_)) 
     88      ENDIF 
     89 
     90      IF (PRESENT(mask_3d_)) THEN 
     91        ALLOCATE(mask_3d__tmp(SIZE(mask_3d_,1), SIZE(mask_3d_,2), SIZE(mask_3d_,3))) 
     92        mask_3d__tmp = mask_3d_ 
     93        CALL cxios_set_gridgroup_mask_3d(gridgroup_hdl%daddr, mask_3d__tmp, SHAPE(mask_3d_)) 
    9494      ENDIF 
    9595 
     
    101101 
    102102  SUBROUTINE xios(get_gridgroup_attr)  & 
    103     ( gridgroup_id, description, group_ref, mask1, mask2, mask3, name ) 
     103    ( gridgroup_id, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    104104 
    105105    IMPLICIT NONE 
     
    108108      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description 
    109109      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
    110       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1(:) 
    111       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:) 
    112       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2(:,:) 
    113       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:) 
    114       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3(:,:,:) 
    115       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:) 
     110      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:) 
     111      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:) 
     112      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:) 
     113      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:) 
     114      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d(:,:,:) 
     115      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:) 
    116116      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    117117 
    118118      CALL xios(get_gridgroup_handle)(gridgroup_id,gridgroup_hdl) 
    119119      CALL xios(get_gridgroup_attr_hdl_)   & 
    120       ( gridgroup_hdl, description, group_ref, mask1, mask2, mask3, name ) 
     120      ( gridgroup_hdl, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    121121 
    122122  END SUBROUTINE xios(get_gridgroup_attr) 
    123123 
    124124  SUBROUTINE xios(get_gridgroup_attr_hdl)  & 
    125     ( gridgroup_hdl, description, group_ref, mask1, mask2, mask3, name ) 
     125    ( gridgroup_hdl, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    126126 
    127127    IMPLICIT NONE 
     
    129129      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description 
    130130      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 
    131       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1(:) 
    132       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1_tmp(:) 
    133       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2(:,:) 
    134       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2_tmp(:,:) 
    135       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3(:,:,:) 
    136       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3_tmp(:,:,:) 
     131      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d(:) 
     132      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d_tmp(:) 
     133      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d(:,:) 
     134      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d_tmp(:,:) 
     135      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d(:,:,:) 
     136      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d_tmp(:,:,:) 
    137137      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 
    138138 
    139139      CALL xios(get_gridgroup_attr_hdl_)  & 
    140       ( gridgroup_hdl, description, group_ref, mask1, mask2, mask3, name ) 
     140      ( gridgroup_hdl, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    141141 
    142142  END SUBROUTINE xios(get_gridgroup_attr_hdl) 
    143143 
    144144  SUBROUTINE xios(get_gridgroup_attr_hdl_)   & 
    145     ( gridgroup_hdl, description_, group_ref_, mask1_, mask2_, mask3_, name_ ) 
     145    ( gridgroup_hdl, description_, group_ref_, mask_1d_, mask_2d_, mask_3d_, name_ ) 
    146146 
    147147    IMPLICIT NONE 
     
    149149      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description_ 
    150150      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_ 
    151       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask1_(:) 
    152       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask1__tmp(:) 
    153       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask2_(:,:) 
    154       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask2__tmp(:,:) 
    155       LOGICAL  , OPTIONAL, INTENT(OUT) :: mask3_(:,:,:) 
    156       LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask3__tmp(:,:,:) 
     151      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_1d_(:) 
     152      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_1d__tmp(:) 
     153      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_2d_(:,:) 
     154      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_2d__tmp(:,:) 
     155      LOGICAL  , OPTIONAL, INTENT(OUT) :: mask_3d_(:,:,:) 
     156      LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_3d__tmp(:,:,:) 
    157157      CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 
    158158 
     
    165165      ENDIF 
    166166 
    167       IF (PRESENT(mask1_)) THEN 
    168         ALLOCATE(mask1__tmp(SIZE(mask1_,1))) 
    169         CALL cxios_get_gridgroup_mask1(gridgroup_hdl%daddr, mask1__tmp, SHAPE(mask1_)) 
    170         mask1_ = mask1__tmp 
    171       ENDIF 
    172  
    173       IF (PRESENT(mask2_)) THEN 
    174         ALLOCATE(mask2__tmp(SIZE(mask2_,1), SIZE(mask2_,2))) 
    175         CALL cxios_get_gridgroup_mask2(gridgroup_hdl%daddr, mask2__tmp, SHAPE(mask2_)) 
    176         mask2_ = mask2__tmp 
    177       ENDIF 
    178  
    179       IF (PRESENT(mask3_)) THEN 
    180         ALLOCATE(mask3__tmp(SIZE(mask3_,1), SIZE(mask3_,2), SIZE(mask3_,3))) 
    181         CALL cxios_get_gridgroup_mask3(gridgroup_hdl%daddr, mask3__tmp, SHAPE(mask3_)) 
    182         mask3_ = mask3__tmp 
     167      IF (PRESENT(mask_1d_)) THEN 
     168        ALLOCATE(mask_1d__tmp(SIZE(mask_1d_,1))) 
     169        CALL cxios_get_gridgroup_mask_1d(gridgroup_hdl%daddr, mask_1d__tmp, SHAPE(mask_1d_)) 
     170        mask_1d_ = mask_1d__tmp 
     171      ENDIF 
     172 
     173      IF (PRESENT(mask_2d_)) THEN 
     174        ALLOCATE(mask_2d__tmp(SIZE(mask_2d_,1), SIZE(mask_2d_,2))) 
     175        CALL cxios_get_gridgroup_mask_2d(gridgroup_hdl%daddr, mask_2d__tmp, SHAPE(mask_2d_)) 
     176        mask_2d_ = mask_2d__tmp 
     177      ENDIF 
     178 
     179      IF (PRESENT(mask_3d_)) THEN 
     180        ALLOCATE(mask_3d__tmp(SIZE(mask_3d_,1), SIZE(mask_3d_,2), SIZE(mask_3d_,3))) 
     181        CALL cxios_get_gridgroup_mask_3d(gridgroup_hdl%daddr, mask_3d__tmp, SHAPE(mask_3d_)) 
     182        mask_3d_ = mask_3d__tmp 
    183183      ENDIF 
    184184 
     
    190190 
    191191  SUBROUTINE xios(is_defined_gridgroup_attr)  & 
    192     ( gridgroup_id, description, group_ref, mask1, mask2, mask3, name ) 
     192    ( gridgroup_id, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    193193 
    194194    IMPLICIT NONE 
     
    199199      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref 
    200200      LOGICAL(KIND=C_BOOL) :: group_ref_tmp 
    201       LOGICAL, OPTIONAL, INTENT(OUT) :: mask1 
    202       LOGICAL(KIND=C_BOOL) :: mask1_tmp 
    203       LOGICAL, OPTIONAL, INTENT(OUT) :: mask2 
    204       LOGICAL(KIND=C_BOOL) :: mask2_tmp 
    205       LOGICAL, OPTIONAL, INTENT(OUT) :: mask3 
    206       LOGICAL(KIND=C_BOOL) :: mask3_tmp 
     201      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d 
     202      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp 
     203      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d 
     204      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp 
     205      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d 
     206      LOGICAL(KIND=C_BOOL) :: mask_3d_tmp 
    207207      LOGICAL, OPTIONAL, INTENT(OUT) :: name 
    208208      LOGICAL(KIND=C_BOOL) :: name_tmp 
     
    210210      CALL xios(get_gridgroup_handle)(gridgroup_id,gridgroup_hdl) 
    211211      CALL xios(is_defined_gridgroup_attr_hdl_)   & 
    212       ( gridgroup_hdl, description, group_ref, mask1, mask2, mask3, name ) 
     212      ( gridgroup_hdl, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    213213 
    214214  END SUBROUTINE xios(is_defined_gridgroup_attr) 
    215215 
    216216  SUBROUTINE xios(is_defined_gridgroup_attr_hdl)  & 
    217     ( gridgroup_hdl, description, group_ref, mask1, mask2, mask3, name ) 
     217    ( gridgroup_hdl, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    218218 
    219219    IMPLICIT NONE 
     
    223223      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref 
    224224      LOGICAL(KIND=C_BOOL) :: group_ref_tmp 
    225       LOGICAL, OPTIONAL, INTENT(OUT) :: mask1 
    226       LOGICAL(KIND=C_BOOL) :: mask1_tmp 
    227       LOGICAL, OPTIONAL, INTENT(OUT) :: mask2 
    228       LOGICAL(KIND=C_BOOL) :: mask2_tmp 
    229       LOGICAL, OPTIONAL, INTENT(OUT) :: mask3 
    230       LOGICAL(KIND=C_BOOL) :: mask3_tmp 
     225      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d 
     226      LOGICAL(KIND=C_BOOL) :: mask_1d_tmp 
     227      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d 
     228      LOGICAL(KIND=C_BOOL) :: mask_2d_tmp 
     229      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d 
     230      LOGICAL(KIND=C_BOOL) :: mask_3d_tmp 
    231231      LOGICAL, OPTIONAL, INTENT(OUT) :: name 
    232232      LOGICAL(KIND=C_BOOL) :: name_tmp 
    233233 
    234234      CALL xios(is_defined_gridgroup_attr_hdl_)  & 
    235       ( gridgroup_hdl, description, group_ref, mask1, mask2, mask3, name ) 
     235      ( gridgroup_hdl, description, group_ref, mask_1d, mask_2d, mask_3d, name ) 
    236236 
    237237  END SUBROUTINE xios(is_defined_gridgroup_attr_hdl) 
    238238 
    239239  SUBROUTINE xios(is_defined_gridgroup_attr_hdl_)   & 
    240     ( gridgroup_hdl, description_, group_ref_, mask1_, mask2_, mask3_, name_ ) 
     240    ( gridgroup_hdl, description_, group_ref_, mask_1d_, mask_2d_, mask_3d_, name_ ) 
    241241 
    242242    IMPLICIT NONE 
     
    246246      LOGICAL, OPTIONAL, INTENT(OUT) :: group_ref_ 
    247247      LOGICAL(KIND=C_BOOL) :: group_ref__tmp 
    248       LOGICAL, OPTIONAL, INTENT(OUT) :: mask1_ 
    249       LOGICAL(KIND=C_BOOL) :: mask1__tmp 
    250       LOGICAL, OPTIONAL, INTENT(OUT) :: mask2_ 
    251       LOGICAL(KIND=C_BOOL) :: mask2__tmp 
    252       LOGICAL, OPTIONAL, INTENT(OUT) :: mask3_ 
    253       LOGICAL(KIND=C_BOOL) :: mask3__tmp 
     248      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_1d_ 
     249      LOGICAL(KIND=C_BOOL) :: mask_1d__tmp 
     250      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_2d_ 
     251      LOGICAL(KIND=C_BOOL) :: mask_2d__tmp 
     252      LOGICAL, OPTIONAL, INTENT(OUT) :: mask_3d_ 
     253      LOGICAL(KIND=C_BOOL) :: mask_3d__tmp 
    254254      LOGICAL, OPTIONAL, INTENT(OUT) :: name_ 
    255255      LOGICAL(KIND=C_BOOL) :: name__tmp 
     
    265265      ENDIF 
    266266 
    267       IF (PRESENT(mask1_)) THEN 
    268         mask1__tmp = cxios_is_defined_gridgroup_mask1(gridgroup_hdl%daddr) 
    269         mask1_ = mask1__tmp 
    270       ENDIF 
    271  
    272       IF (PRESENT(mask2_)) THEN 
    273         mask2__tmp = cxios_is_defined_gridgroup_mask2(gridgroup_hdl%daddr) 
    274         mask2_ = mask2__tmp 
    275       ENDIF 
    276  
    277       IF (PRESENT(mask3_)) THEN 
    278         mask3__tmp = cxios_is_defined_gridgroup_mask3(gridgroup_hdl%daddr) 
    279         mask3_ = mask3__tmp 
     267      IF (PRESENT(mask_1d_)) THEN 
     268        mask_1d__tmp = cxios_is_defined_gridgroup_mask_1d(gridgroup_hdl%daddr) 
     269        mask_1d_ = mask_1d__tmp 
     270      ENDIF 
     271 
     272      IF (PRESENT(mask_2d_)) THEN 
     273        mask_2d__tmp = cxios_is_defined_gridgroup_mask_2d(gridgroup_hdl%daddr) 
     274        mask_2d_ = mask_2d__tmp 
     275      ENDIF 
     276 
     277      IF (PRESENT(mask_3d_)) THEN 
     278        mask_3d__tmp = cxios_is_defined_gridgroup_mask_3d(gridgroup_hdl%daddr) 
     279        mask_3d_ = mask_3d__tmp 
    280280      ENDIF 
    281281 
  • XIOS/trunk/src/node/axis.cpp

    r816 r817  
    230230      } 
    231231 
    232 //      StdSize true_size = value.numElements(); 
    233 //      if (this->n.getValue() != true_size) 
    234 //        ERROR("CAxis::checkAttributes(void)", 
    235 //              << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
    236 //              << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size << ") than the one defined by the \'size\' attribute (" << n.getValue() << ")."); 
     232      if (this->index.isEmpty()) 
     233      { 
     234        index.resize(n); 
     235        for (int i = 0; i < n; ++i) index(i) = i+begin; 
     236      } 
    237237 
    238238      this->checkData(); 
     
    393393    size_t zoom_end = global_zoom_begin+global_zoom_size-1; 
    394394    size_t nZoomCount = 0; 
    395     for (size_t idx = 0; idx < ni; ++idx) 
    396     { 
    397       size_t globalIndex = ibegin + idx; 
    398  
     395    size_t nbIndex = index.numElements(); 
     396    for (size_t idx = 0; idx < nbIndex; ++idx) 
     397    { 
     398      size_t globalIndex = index(idx); 
    399399      if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) ++nZoomCount; 
    400400    } 
    401401 
    402     CArray<size_t,1> globalIndexAxis(ni); 
     402    CArray<size_t,1> globalIndexAxis(nbIndex); 
    403403    std::vector<size_t> globalAxisZoom(nZoomCount); 
    404404    nZoomCount = 0; 
    405     for (size_t idx = 0; idx < ni; ++idx) 
    406     { 
    407       size_t globalIndex = ibegin + idx; 
     405    for (size_t idx = 0; idx < nbIndex; ++idx) 
     406    { 
     407      size_t globalIndex = index(idx); 
    408408      globalIndexAxis(idx) = globalIndex; 
    409409      if (globalIndex >= global_zoom_begin && globalIndex <= zoom_end) 
  • XIOS/trunk/src/node/grid.cpp

    r815 r817  
    227227   { 
    228228     // We don't check if the mask is valid here, just if a mask has been defined at this point. 
    229      isCompressible_ = !mask1.isEmpty() || !mask2.isEmpty() || !mask3.isEmpty(); 
     229     isCompressible_ = !mask_1d.isEmpty() || !mask_2d.isEmpty() || !mask_3d.isEmpty(); 
    230230   } 
    231231 
     
    278278      switch (dim) { 
    279279        case 1: 
    280           checkGridMask(mask1, domainMasks, axisMasks, axis_domain_order); 
     280          checkGridMask(mask_1d, domainMasks, axisMasks, axis_domain_order); 
    281281          break; 
    282282        case 2: 
    283           checkGridMask(mask2, domainMasks, axisMasks, axis_domain_order); 
     283          checkGridMask(mask_2d, domainMasks, axisMasks, axis_domain_order); 
    284284          break; 
    285285        case 3: 
    286           checkGridMask(mask3, domainMasks, axisMasks, axis_domain_order); 
     286          checkGridMask(mask_3d, domainMasks, axisMasks, axis_domain_order); 
    287287          break; 
    288288//        case 4: 
     
    312312      switch (dim) { 
    313313        case 1: 
    314           modifyGridMask(mask1, indexToModify); 
     314          modifyGridMask(mask_1d, indexToModify); 
    315315          break; 
    316316        case 2: 
    317           modifyGridMask(mask2, indexToModify); 
     317          modifyGridMask(mask_2d, indexToModify); 
    318318          break; 
    319319        case 3: 
    320           modifyGridMask(mask3, indexToModify); 
     320          modifyGridMask(mask_3d, indexToModify); 
    321321          break; 
    322322 
Note: See TracChangeset for help on using the changeset viewer.