Changeset 42 for XMLIO_SERVER/trunk/src/XMLIO/mod_grid.f90
- Timestamp:
- 10/30/09 16:29:39 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_SERVER/trunk/src/XMLIO/mod_grid.f90
r40 r42 30 30 TYPE(sorted_list),POINTER,SAVE,PRIVATE :: Ids 31 31 32 INTERFACE grid__set_attribut 33 MODULE PROCEDURE grid__set_attribut_id,grid__set_attribut_pt 34 END INTERFACE 35 32 36 CONTAINS 33 37 INCLUDE 'vector_grid_contains.inc' … … 121 125 122 126 123 SUBROUTINE grid__set_attribut(id,attrib) 127 SUBROUTINE grid__set_attribut_id(id,attrib,ok) 128 USE mod_attribut 129 USE error_msg 130 IMPLICIT NONE 131 CHARACTER(LEN=*),INTENT(IN) :: id 132 TYPE(attribut),INTENT(IN) :: attrib 133 LOGICAL,OPTIONAL,INTENT(OUT) :: ok 134 135 TYPE(grid),POINTER :: Pt_grid 136 INTEGER :: Pos 137 LOGICAL :: success 138 139 CALL sorted_list__find(Ids,hash(Id),Pos,success) 140 IF (success) THEN 141 Pt_grid=>grid_ids%at(Pos)%Pt 142 CALL grid__set_attribut_pt(Pt_grid,attrib) 143 IF (PRESENT(OK)) OK=.TRUE. 144 ELSE 145 IF (.NOT.PRESENT(OK)) THEN 146 WRITE(message,*) 'grid id :',id,'is undefined' 147 CALL error('mod_grid::grid__set_attribut') 148 ELSE 149 OK=.FALSE. 150 ENDIF 151 ENDIF 152 153 END SUBROUTINE grid__set_attribut_id 154 155 SUBROUTINE grid__set_attribut_pt(Pt_grid,attrib) 124 156 USE mod_attribut 125 157 USE mod_grid_attribut 126 158 USE error_msg 127 159 IMPLICIT NONE 128 CHARACTER(LEN=*),INTENT(IN) ::id160 TYPE(grid),POINTER :: Pt_grid 129 161 TYPE(attribut),INTENT(IN) :: attrib 130 131 TYPE(grid),POINTER :: Pt_grid132 INTEGER :: Pos133 LOGICAL :: success134 135 CALL sorted_list__find(Ids,hash(Id),Pos,success)136 IF (success) THEN137 Pt_grid=>grid_ids%at(Pos)%Pt138 ELSE139 WRITE(message,*) 'grid id :',id,'is undefined'140 CALL error('mod_grid::grid__set_attribut')141 ENDIF142 162 143 163 SELECT CASE(attrib%name) … … 148 168 END SELECT 149 169 150 WRITE(message,*) 'grid id ',id,' : Attribute type is incompatible with the provided value'170 WRITE(message,*) 'grid attribut ',attrib%name,' : type :',attrib%type,' : Attribute type is incompatible with the provided value' 151 171 CALL error('mod_grid::grid__set_attribut') 152 172 153 END SUBROUTINE grid__set_attribut 173 END SUBROUTINE grid__set_attribut_pt 154 174 155 175 SUBROUTINE grid__set_dimension(pt_grid, ni, nj)
Note: See TracChangeset
for help on using the changeset viewer.