- Timestamp:
- 01/20/13 23:14:35 (11 years ago)
- Location:
- XIOS/trunk/src
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/attribute_array_decl.cpp
r369 r415 8 8 template class CAttributeArray<int,1> ; 9 9 template class CAttributeArray<bool,2> ; 10 template class CAttributeArray<bool,3> ; 10 11 } -
XIOS/trunk/src/config/grid_attribute.conf
r219 r415 3 3 DECLARE_ATTRIBUTE(StdString, domain_ref) 4 4 DECLARE_ATTRIBUTE(StdString, axis_ref) 5 5 DECLARE_ARRAY(bool, 3 , mask) -
XIOS/trunk/src/declare_attribute.hpp
r369 r415 22 22 { \ 23 23 public : \ 24 using CAttributeArray<T_num, T_rank>::operator = ; \ 24 25 name##_attr(void) : CAttributeArray<T_num, T_rank> (#name, *CAttributeMap::Current) {} \ 25 26 virtual ~name##_attr(void) {} \ -
XIOS/trunk/src/generate_interface_impl.hpp
r369 r415 603 603 oss<<"{"<<iendl ;\ 604 604 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 ;\ 606 606 oss<<" "<<className<<"_hdl->"<<name<<".reference(tmp.copy());"<<iendl ;\ 607 607 oss<<" "<<className<<"_hdl->sendAttributToServer("<<className<<"_hdl->"<<name<<");"<<iendl ;\ … … 610 610 oss<<"void cxios_get_"<<className<<"_"<<name<<"("<<className<<"_Ptr "<<className<<"_hdl, "<< typeName<<"* "<<name<<", int extent1, int extent2, int extent3)"<<iendl ;\ 611 611 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 ;\ 613 613 oss<<" tmp="<<className<<"_hdl->"<<name<<" ;"<<iendl ;\ 614 614 oss<<" CTimer::get(\"XIOS\").suspend();"<<iendl ;\ -
XIOS/trunk/src/interface/c_attr/icaxis_attr.cpp
r369 r415 51 51 if(!string_copy(axis_hdl->name.getValue(),name , name_size)) 52 52 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"); 53 72 CTimer::get("XIOS").suspend(); 54 73 } -
XIOS/trunk/src/interface/c_attr/icaxisgroup_attr.cpp
r369 r415 74 74 75 75 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 76 95 void cxios_set_axisgroup_size(axisgroup_Ptr axisgroup_hdl, int size) 77 96 { -
XIOS/trunk/src/interface/c_attr/icfile_attr.cpp
r369 r415 50 50 51 51 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 52 66 void cxios_set_file_name(file_Ptr file_hdl, const char * name, int name_size) 53 67 { -
XIOS/trunk/src/interface/c_attr/icfilegroup_attr.cpp
r369 r415 69 69 70 70 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 71 85 void cxios_set_filegroup_name(filegroup_Ptr filegroup_hdl, const char * name, int name_size) 72 86 { -
XIOS/trunk/src/interface/c_attr/icgrid_attr.cpp
r369 r415 74 74 75 75 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 76 92 void cxios_set_grid_name(grid_Ptr grid_hdl, const char * name, int name_size) 77 93 { -
XIOS/trunk/src/interface/c_attr/icgridgroup_attr.cpp
r369 r415 93 93 94 94 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 95 111 void cxios_set_gridgroup_name(gridgroup_Ptr gridgroup_hdl, const char * name, int name_size) 96 112 { -
XIOS/trunk/src/interface/fortran_attr/axis_interface_attr.f90
r369 r415 37 37 INTEGER (kind = C_INT) , VALUE :: name_size 38 38 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 39 54 40 55 -
XIOS/trunk/src/interface/fortran_attr/axisgroup_interface_attr.f90
r369 r415 52 52 INTEGER (kind = C_INT) , VALUE :: name_size 53 53 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 54 69 55 70 -
XIOS/trunk/src/interface/fortran_attr/file_interface_attr.f90
r336 r415 35 35 LOGICAL (KIND=C_BOOL) :: enabled 36 36 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 37 50 38 51 -
XIOS/trunk/src/interface/fortran_attr/filegroup_interface_attr.f90
r336 r415 50 50 INTEGER (kind = C_INT) , VALUE :: group_ref_size 51 51 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 52 65 53 66 -
XIOS/trunk/src/interface/fortran_attr/grid_interface_attr.f90
r326 r415 54 54 55 55 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 56 75 SUBROUTINE cxios_set_grid_name(grid_hdl, name, name_size) BIND(C) 57 76 USE ISO_C_BINDING -
XIOS/trunk/src/interface/fortran_attr/gridgroup_interface_attr.f90
r326 r415 69 69 70 70 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 71 90 SUBROUTINE cxios_set_gridgroup_name(gridgroup_hdl, name, name_size) BIND(C) 72 91 USE ISO_C_BINDING -
XIOS/trunk/src/interface/fortran_attr/iaxis_attr.F90
r369 r415 12 12 13 13 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 ) 16 16 17 17 IMPLICIT NONE … … 20 20 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 21 21 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 22 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 22 23 INTEGER , OPTIONAL, INTENT(IN) :: size 23 24 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name … … 30 31 CALL xios(get_axis_handle)(axis_id,axis_hdl) 31 32 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 ) 34 35 35 36 END SUBROUTINE xios(set_axis_attr) 36 37 37 38 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 ) 40 41 41 42 IMPLICIT NONE … … 43 44 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 44 45 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 46 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 45 47 INTEGER , OPTIONAL, INTENT(IN) :: size 46 48 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name … … 52 54 53 55 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 ) 56 58 57 59 END SUBROUTINE xios(set_axis_attr_hdl) 58 60 59 61 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_ ) 62 64 63 65 IMPLICIT NONE … … 65 67 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_ 66 68 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 69 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive_ 67 70 INTEGER , OPTIONAL, INTENT(IN) :: size_ 68 71 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_ … … 81 84 ENDIF 82 85 86 IF (PRESENT(positive_)) THEN 87 CALL cxios_set_axis_positive(axis_hdl%daddr, positive_, len(positive_)) 88 ENDIF 89 83 90 IF (PRESENT(size_)) THEN 84 91 CALL cxios_set_axis_size(axis_hdl%daddr, size_) … … 114 121 115 122 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 ) 118 125 119 126 IMPLICIT NONE … … 122 129 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 123 130 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 131 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 124 132 INTEGER , OPTIONAL, INTENT(OUT) :: size 125 133 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name … … 132 140 CALL xios(get_axis_handle)(axis_id,axis_hdl) 133 141 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 ) 136 144 137 145 END SUBROUTINE xios(get_axis_attr) 138 146 139 147 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 ) 142 150 143 151 IMPLICIT NONE … … 145 153 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 146 154 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 155 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 147 156 INTEGER , OPTIONAL, INTENT(OUT) :: size 148 157 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name … … 154 163 155 164 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 ) 158 167 159 168 END SUBROUTINE xios(get_axis_attr_hdl) 160 169 161 170 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_ ) 164 173 165 174 IMPLICIT NONE … … 167 176 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_ 168 177 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 178 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive_ 169 179 INTEGER , OPTIONAL, INTENT(OUT) :: size_ 170 180 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_ … … 183 193 ENDIF 184 194 195 IF (PRESENT(positive_)) THEN 196 CALL cxios_get_axis_positive(axis_hdl%daddr, positive_, len(positive_)) 197 ENDIF 198 185 199 IF (PRESENT(size_)) THEN 186 200 CALL cxios_get_axis_size(axis_hdl%daddr, size_) -
XIOS/trunk/src/interface/fortran_attr/iaxisgroup_attr.F90
r369 r415 12 12 13 13 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 ) 16 16 17 17 IMPLICIT NONE … … 21 21 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 22 22 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 23 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 23 24 INTEGER , OPTIONAL, INTENT(IN) :: size 24 25 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name … … 31 32 CALL xios(get_axisgroup_handle)(axisgroup_id,axisgroup_hdl) 32 33 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 ) 35 36 36 37 END SUBROUTINE xios(set_axisgroup_attr) 37 38 38 39 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 ) 41 42 42 43 IMPLICIT NONE … … 45 46 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name 46 47 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 48 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive 47 49 INTEGER , OPTIONAL, INTENT(IN) :: size 48 50 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name … … 54 56 55 57 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 ) 58 60 59 61 END SUBROUTINE xios(set_axisgroup_attr_hdl) 60 62 61 63 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_ ) 64 66 65 67 IMPLICIT NONE … … 68 70 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: long_name_ 69 71 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 72 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: positive_ 70 73 INTEGER , OPTIONAL, INTENT(IN) :: size_ 71 74 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: standard_name_ … … 88 91 ENDIF 89 92 93 IF (PRESENT(positive_)) THEN 94 CALL cxios_set_axisgroup_positive(axisgroup_hdl%daddr, positive_, len(positive_)) 95 ENDIF 96 90 97 IF (PRESENT(size_)) THEN 91 98 CALL cxios_set_axisgroup_size(axisgroup_hdl%daddr, size_) … … 121 128 122 129 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 ) 125 132 126 133 IMPLICIT NONE … … 130 137 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 131 138 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 139 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 132 140 INTEGER , OPTIONAL, INTENT(OUT) :: size 133 141 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name … … 140 148 CALL xios(get_axisgroup_handle)(axisgroup_id,axisgroup_hdl) 141 149 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 ) 144 152 145 153 END SUBROUTINE xios(get_axisgroup_attr) 146 154 147 155 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 ) 150 158 151 159 IMPLICIT NONE … … 154 162 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name 155 163 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 164 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive 156 165 INTEGER , OPTIONAL, INTENT(OUT) :: size 157 166 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name … … 163 172 164 173 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 ) 167 176 168 177 END SUBROUTINE xios(get_axisgroup_attr_hdl) 169 178 170 179 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_ ) 173 182 174 183 IMPLICIT NONE … … 177 186 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: long_name_ 178 187 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 188 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: positive_ 179 189 INTEGER , OPTIONAL, INTENT(OUT) :: size_ 180 190 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: standard_name_ … … 197 207 ENDIF 198 208 209 IF (PRESENT(positive_)) THEN 210 CALL cxios_get_axisgroup_positive(axisgroup_hdl%daddr, positive_, len(positive_)) 211 ENDIF 212 199 213 IF (PRESENT(size_)) THEN 200 214 CALL cxios_get_axisgroup_size(axisgroup_hdl%daddr, size_) -
XIOS/trunk/src/interface/fortran_attr/ifile_attr.F90
r369 r415 12 12 13 13 SUBROUTINE xios(set_file_attr) & 14 ( file_id, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq&15 , s ync_freq, type )14 ( file_id, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access & 15 , split_freq, sync_freq, type ) 16 16 17 17 IMPLICIT NONE … … 21 21 LOGICAL , OPTIONAL, INTENT(IN) :: enabled 22 22 LOGICAL (KIND=C_BOOL) :: enabled_tmp 23 INTEGER , OPTIONAL, INTENT(IN) :: min_digits 23 24 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 24 25 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix … … 32 33 CALL xios(get_file_handle)(file_id,file_hdl) 33 34 CALL xios(set_file_attr_hdl_) & 34 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq&35 , s ync_freq, type )35 ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access & 36 , split_freq, sync_freq, type ) 36 37 37 38 END SUBROUTINE xios(set_file_attr) 38 39 39 40 SUBROUTINE xios(set_file_attr_hdl) & 40 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq&41 , s ync_freq, type )41 ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access & 42 , split_freq, sync_freq, type ) 42 43 43 44 IMPLICIT NONE … … 46 47 LOGICAL , OPTIONAL, INTENT(IN) :: enabled 47 48 LOGICAL (KIND=C_BOOL) :: enabled_tmp 49 INTEGER , OPTIONAL, INTENT(IN) :: min_digits 48 50 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 49 51 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix … … 56 58 57 59 CALL xios(set_file_attr_hdl_) & 58 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq&59 , s ync_freq, type )60 ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access & 61 , split_freq, sync_freq, type ) 60 62 61 63 END SUBROUTINE xios(set_file_attr_hdl) 62 64 63 65 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_ ) 66 68 67 69 IMPLICIT NONE … … 70 72 LOGICAL , OPTIONAL, INTENT(IN) :: enabled_ 71 73 LOGICAL (KIND=C_BOOL) :: enabled__tmp 74 INTEGER , OPTIONAL, INTENT(IN) :: min_digits_ 72 75 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 73 76 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix_ … … 88 91 ENDIF 89 92 93 IF (PRESENT(min_digits_)) THEN 94 CALL cxios_set_file_min_digits(file_hdl%daddr, min_digits_) 95 ENDIF 96 90 97 IF (PRESENT(name_)) THEN 91 98 CALL cxios_set_file_name(file_hdl%daddr, name_, len(name_)) … … 125 132 126 133 SUBROUTINE xios(get_file_attr) & 127 ( file_id, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq&128 , s ync_freq, type )134 ( file_id, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access & 135 , split_freq, sync_freq, type ) 129 136 130 137 IMPLICIT NONE … … 134 141 LOGICAL , OPTIONAL, INTENT(OUT) :: enabled 135 142 LOGICAL (KIND=C_BOOL) :: enabled_tmp 143 INTEGER , OPTIONAL, INTENT(OUT) :: min_digits 136 144 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 137 145 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix … … 145 153 CALL xios(get_file_handle)(file_id,file_hdl) 146 154 CALL xios(get_file_attr_hdl_) & 147 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq&148 , s ync_freq, type )155 ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access & 156 , split_freq, sync_freq, type ) 149 157 150 158 END SUBROUTINE xios(get_file_attr) 151 159 152 160 SUBROUTINE xios(get_file_attr_hdl) & 153 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq&154 , s ync_freq, type )161 ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access & 162 , split_freq, sync_freq, type ) 155 163 156 164 IMPLICIT NONE … … 159 167 LOGICAL , OPTIONAL, INTENT(OUT) :: enabled 160 168 LOGICAL (KIND=C_BOOL) :: enabled_tmp 169 INTEGER , OPTIONAL, INTENT(OUT) :: min_digits 161 170 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 162 171 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix … … 169 178 170 179 CALL xios(get_file_attr_hdl_) & 171 ( file_hdl, description, enabled, name, name_suffix, output_freq, output_level, par_access, split_freq&172 , s ync_freq, type )180 ( file_hdl, description, enabled, min_digits, name, name_suffix, output_freq, output_level, par_access & 181 , split_freq, sync_freq, type ) 173 182 174 183 END SUBROUTINE xios(get_file_attr_hdl) 175 184 176 185 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_ ) 179 188 180 189 IMPLICIT NONE … … 183 192 LOGICAL , OPTIONAL, INTENT(OUT) :: enabled_ 184 193 LOGICAL (KIND=C_BOOL) :: enabled__tmp 194 INTEGER , OPTIONAL, INTENT(OUT) :: min_digits_ 185 195 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 186 196 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix_ … … 201 211 ENDIF 202 212 213 IF (PRESENT(min_digits_)) THEN 214 CALL cxios_get_file_min_digits(file_hdl%daddr, min_digits_) 215 ENDIF 216 203 217 IF (PRESENT(name_)) THEN 204 218 CALL cxios_get_file_name(file_hdl%daddr, name_, len(name_)) -
XIOS/trunk/src/interface/fortran_attr/ifilegroup_attr.F90
r369 r415 12 12 13 13 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 ) 16 16 17 17 IMPLICIT NONE … … 22 22 LOGICAL (KIND=C_BOOL) :: enabled_tmp 23 23 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 24 INTEGER , OPTIONAL, INTENT(IN) :: min_digits 24 25 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 25 26 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix … … 33 34 CALL xios(get_filegroup_handle)(filegroup_id,filegroup_hdl) 34 35 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 ) 37 38 38 39 END SUBROUTINE xios(set_filegroup_attr) 39 40 40 41 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 ) 43 44 44 45 IMPLICIT NONE … … 48 49 LOGICAL (KIND=C_BOOL) :: enabled_tmp 49 50 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 51 INTEGER , OPTIONAL, INTENT(IN) :: min_digits 50 52 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 51 53 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix … … 58 60 59 61 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 ) 62 64 63 65 END SUBROUTINE xios(set_filegroup_attr_hdl) 64 66 65 67 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_ ) 68 70 69 71 IMPLICIT NONE … … 73 75 LOGICAL (KIND=C_BOOL) :: enabled__tmp 74 76 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_ 77 INTEGER , OPTIONAL, INTENT(IN) :: min_digits_ 75 78 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 76 79 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_suffix_ … … 95 98 ENDIF 96 99 100 IF (PRESENT(min_digits_)) THEN 101 CALL cxios_set_filegroup_min_digits(filegroup_hdl%daddr, min_digits_) 102 ENDIF 103 97 104 IF (PRESENT(name_)) THEN 98 105 CALL cxios_set_filegroup_name(filegroup_hdl%daddr, name_, len(name_)) … … 132 139 133 140 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 ) 136 143 137 144 IMPLICIT NONE … … 142 149 LOGICAL (KIND=C_BOOL) :: enabled_tmp 143 150 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 151 INTEGER , OPTIONAL, INTENT(OUT) :: min_digits 144 152 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 145 153 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix … … 153 161 CALL xios(get_filegroup_handle)(filegroup_id,filegroup_hdl) 154 162 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 ) 157 165 158 166 END SUBROUTINE xios(get_filegroup_attr) 159 167 160 168 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 ) 163 171 164 172 IMPLICIT NONE … … 168 176 LOGICAL (KIND=C_BOOL) :: enabled_tmp 169 177 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 178 INTEGER , OPTIONAL, INTENT(OUT) :: min_digits 170 179 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 171 180 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix … … 178 187 179 188 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 ) 182 191 183 192 END SUBROUTINE xios(get_filegroup_attr_hdl) 184 193 185 194 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_ ) 188 197 189 198 IMPLICIT NONE … … 193 202 LOGICAL (KIND=C_BOOL) :: enabled__tmp 194 203 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_ 204 INTEGER , OPTIONAL, INTENT(OUT) :: min_digits_ 195 205 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 196 206 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_suffix_ … … 215 225 ENDIF 216 226 227 IF (PRESENT(min_digits_)) THEN 228 CALL cxios_get_filegroup_min_digits(filegroup_hdl%daddr, min_digits_) 229 ENDIF 230 217 231 IF (PRESENT(name_)) THEN 218 232 CALL cxios_get_filegroup_name(filegroup_hdl%daddr, name_, len(name_)) -
XIOS/trunk/src/interface/fortran_attr/igrid_attr.F90
r326 r415 12 12 13 13 SUBROUTINE xios(set_grid_attr) & 14 ( grid_id, axis_ref, description, domain_ref, name )14 ( grid_id, axis_ref, description, domain_ref, mask, name ) 15 15 16 16 IMPLICIT NONE … … 20 20 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description 21 21 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref 22 LOGICAL , OPTIONAL, INTENT(IN) :: mask(:,:,:) 23 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 22 24 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 23 25 24 26 CALL xios(get_grid_handle)(grid_id,grid_hdl) 25 27 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 ) 27 29 28 30 END SUBROUTINE xios(set_grid_attr) 29 31 30 32 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 ) 32 34 33 35 IMPLICIT NONE … … 36 38 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description 37 39 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref 40 LOGICAL , OPTIONAL, INTENT(IN) :: mask(:,:,:) 41 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 38 42 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 39 43 40 44 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 ) 42 46 43 47 END SUBROUTINE xios(set_grid_attr_hdl) 44 48 45 49 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_ ) 47 51 48 52 IMPLICIT NONE … … 51 55 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: description_ 52 56 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref_ 57 LOGICAL , OPTIONAL, INTENT(IN) :: mask_(:,:,:) 58 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:) 53 59 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 54 60 … … 65 71 ENDIF 66 72 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 67 79 IF (PRESENT(name_)) THEN 68 80 CALL cxios_set_grid_name(grid_hdl%daddr, name_, len(name_)) … … 74 86 75 87 SUBROUTINE xios(get_grid_attr) & 76 ( grid_id, axis_ref, description, domain_ref, name )88 ( grid_id, axis_ref, description, domain_ref, mask, name ) 77 89 78 90 IMPLICIT NONE … … 82 94 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description 83 95 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref 96 LOGICAL , OPTIONAL, INTENT(OUT) :: mask(:,:,:) 97 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 84 98 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 85 99 86 100 CALL xios(get_grid_handle)(grid_id,grid_hdl) 87 101 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 ) 89 103 90 104 END SUBROUTINE xios(get_grid_attr) 91 105 92 106 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 ) 94 108 95 109 IMPLICIT NONE … … 98 112 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description 99 113 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref 114 LOGICAL , OPTIONAL, INTENT(OUT) :: mask(:,:,:) 115 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 100 116 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 101 117 102 118 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 ) 104 120 105 121 END SUBROUTINE xios(get_grid_attr_hdl) 106 122 107 123 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_ ) 109 125 110 126 IMPLICIT NONE … … 113 129 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: description_ 114 130 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref_ 131 LOGICAL , OPTIONAL, INTENT(OUT) :: mask_(:,:,:) 132 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:) 115 133 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 116 134 … … 127 145 ENDIF 128 146 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 129 153 IF (PRESENT(name_)) THEN 130 154 CALL cxios_get_grid_name(grid_hdl%daddr, name_, len(name_)) -
XIOS/trunk/src/interface/fortran_attr/igridgroup_attr.F90
r326 r415 12 12 13 13 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 ) 15 15 16 16 IMPLICIT NONE … … 21 21 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref 22 22 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 23 LOGICAL , OPTIONAL, INTENT(IN) :: mask(:,:,:) 24 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 23 25 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 24 26 25 27 CALL xios(get_gridgroup_handle)(gridgroup_id,gridgroup_hdl) 26 28 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 ) 28 30 29 31 END SUBROUTINE xios(set_gridgroup_attr) 30 32 31 33 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 ) 33 35 34 36 IMPLICIT NONE … … 38 40 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref 39 41 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref 42 LOGICAL , OPTIONAL, INTENT(IN) :: mask(:,:,:) 43 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 40 44 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name 41 45 42 46 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 ) 44 48 45 49 END SUBROUTINE xios(set_gridgroup_attr_hdl) 46 50 47 51 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_ ) 49 53 50 54 IMPLICIT NONE … … 54 58 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: domain_ref_ 55 59 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: group_ref_ 60 LOGICAL , OPTIONAL, INTENT(IN) :: mask_(:,:,:) 61 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:) 56 62 CHARACTER(len = *) , OPTIONAL, INTENT(IN) :: name_ 57 63 … … 72 78 ENDIF 73 79 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 74 86 IF (PRESENT(name_)) THEN 75 87 CALL cxios_set_gridgroup_name(gridgroup_hdl%daddr, name_, len(name_)) … … 81 93 82 94 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 ) 84 96 85 97 IMPLICIT NONE … … 90 102 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref 91 103 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 104 LOGICAL , OPTIONAL, INTENT(OUT) :: mask(:,:,:) 105 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 92 106 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 93 107 94 108 CALL xios(get_gridgroup_handle)(gridgroup_id,gridgroup_hdl) 95 109 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 ) 97 111 98 112 END SUBROUTINE xios(get_gridgroup_attr) 99 113 100 114 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 ) 102 116 103 117 IMPLICIT NONE … … 107 121 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref 108 122 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref 123 LOGICAL , OPTIONAL, INTENT(OUT) :: mask(:,:,:) 124 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask_tmp(:,:,:) 109 125 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name 110 126 111 127 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 ) 113 129 114 130 END SUBROUTINE xios(get_gridgroup_attr_hdl) 115 131 116 132 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_ ) 118 134 119 135 IMPLICIT NONE … … 123 139 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: domain_ref_ 124 140 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: group_ref_ 141 LOGICAL , OPTIONAL, INTENT(OUT) :: mask_(:,:,:) 142 LOGICAL (KIND=C_BOOL) , ALLOCATABLE :: mask__tmp(:,:,:) 125 143 CHARACTER(len = *) , OPTIONAL, INTENT(OUT) :: name_ 126 144 … … 141 159 ENDIF 142 160 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 143 167 IF (PRESENT(name_)) THEN 144 168 CALL cxios_get_gridgroup_name(gridgroup_hdl%daddr, name_, len(name_)) -
XIOS/trunk/src/node/grid.cpp
r369 r415 176 176 this->solveDomainRef() ; 177 177 this->solveAxisRef() ; 178 178 179 if (context->hasClient) 179 180 { 180 181 checkMask() ; 181 182 this->computeIndex() ; 182 183 … … 190 191 } 191 192 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 192 224 //--------------------------------------------------------------- 193 225 … … 246 278 CArray<int,1> data_i_index = domain->data_i_index ; 247 279 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 ;252 280 253 281 … … 268 296 if ((l >=lbegin && l<= lend) && 269 297 (i >= 0 && i < ni) && 270 (j >= 0 && j < nj) && mask(i,j ))298 (j >= 0 && j < nj) && mask(i,j,l)) 271 299 indexCount++ ; 272 300 } … … 298 326 if ((l >= lbegin && l <= lend) && 299 327 (i >= 0 && i < ni) && 300 (j >= 0 && j < nj) && mask(i,j ))328 (j >= 0 && j < nj) && mask(i,j,l)) 301 329 { 302 330 (*storeIndex[0])(indexCount) = count ; -
XIOS/trunk/src/node/grid.hpp
r369 r415 152 152 map<int, CArray<int, 1>* > out_j_fromClient ; 153 153 map<int, CArray<int, 1>* > out_l_fromClient ; 154 154 void checkMask(void) ; 155 155 }; // class CGrid 156 156
Note: See TracChangeset
for help on using the changeset viewer.