Changeset 29
- Timestamp:
- 04/15/09 17:34:38 (16 years ago)
- Location:
- XMLIO_SERVER/trunk/src
- Files:
-
- 3 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
XMLIO_SERVER/trunk/src/IOSERVER/mod_interface_ioipsl.f90
r28 r29 38 38 TYPE(field),POINTER :: pt_field 39 39 TYPE(grid),POINTER :: pt_grid 40 TYPE(zoom),POINTER :: pt_zoom 40 41 TYPE(axis),POINTER :: pt_axis 41 42 TYPE(domain),POINTER :: pt_domain … … 48 49 INTEGER :: ioipsl_domain_id 49 50 INTEGER :: i,j 51 CHARACTER(LEN=20) :: direction 50 52 51 53 CALL xmlio__close_definition … … 61 63 pt_grid=>pt_file_dep%grids%at(1)%pt 62 64 pt_domain=>pt_grid%domain 63 CALL set_ioipsl_domain_id(pt_grid,nb_server,server_rank,ioipsl_domain_id) 64 CALL histbeg(TRIM(pt_file%name),pt_domain%ni,pt_domain%lon, pt_domain%nj, pt_domain%lat, & 65 1, pt_domain%ni, 1, pt_domain%nj,initial_timestep, initial_date, timestep_value, & 66 ioipsl_hori_id, ioipsl_file_id,domain_id=ioipsl_domain_id) 67 68 DO j=1,pt_file_dep%axis%size 69 pt_axis=>pt_file_dep%axis%at(j)%pt 70 CALL sorted_list__find(axis_id,hash(Pt_axis%name),ioipsl_axis_id,found) 71 IF (.NOT. found) THEN 72 IF (TRIM(pt_axis%name) /= "none") THEN 73 CALL histvert(ioipsl_file_id, TRIM(pt_axis%name),TRIM(pt_axis%description), & 74 TRIM(pt_axis%unit), pt_axis%size,pt_axis%values, ioipsl_axis_id) 75 CALL sorted_list__add(axis_id,hash(Pt_axis%name),ioipsl_axis_id) 65 pt_zoom=>pt_file_dep%zooms%at(1)%pt 66 ! print *,TRIM(pt_file%name),' ',TRIM(pt_zoom%id) 67 ! print*,'Global --->',pt_zoom%ni_glo,pt_zoom%nj_glo,pt_zoom%ibegin_glo,pt_zoom%jbegin_glo 68 ! print*,'Local --->',pt_zoom%ni_loc,pt_zoom%nj_loc,pt_zoom%ibegin_loc,pt_zoom%jbegin_loc 69 70 IF (pt_zoom%ni_loc*pt_zoom%nj_loc > 0) THEN 71 72 IF ( (pt_zoom%ni_loc == pt_zoom%ni_glo) .AND. (pt_zoom%nj_loc == pt_zoom%nj_glo) ) THEN 73 74 CALL histbeg(TRIM(pt_file%name),pt_domain%ni,pt_domain%lon, pt_domain%nj, pt_domain%lat, & 75 pt_zoom%ibegin_loc, pt_zoom%ni_loc,pt_zoom%jbegin_loc,pt_zoom%nj_loc, & & 76 initial_timestep, initial_date, timestep_value, & 77 ioipsl_hori_id, ioipsl_file_id) 78 ELSE 79 80 CALL set_ioipsl_domain_id(pt_grid,nb_server,server_rank,ioipsl_domain_id) 81 CALL histbeg(TRIM(pt_file%name),pt_domain%ni,pt_domain%lon, pt_domain%nj, pt_domain%lat, & 82 pt_zoom%ibegin_loc, pt_zoom%ni_loc,pt_zoom%jbegin_loc,pt_zoom%nj_loc, & & 83 initial_timestep, initial_date, timestep_value, & 84 ioipsl_hori_id, ioipsl_file_id,domain_id=ioipsl_domain_id) 85 86 ENDIF 87 88 89 DO j=1,pt_file_dep%axis%size 90 pt_axis=>pt_file_dep%axis%at(j)%pt 91 CALL sorted_list__find(axis_id,hash(Pt_axis%name),ioipsl_axis_id,found) 92 IF (.NOT. found) THEN 93 IF (TRIM(pt_axis%name) /= "none") THEN 94 95 IF (pt_axis%has_positive) THEN 96 IF (pt_axis%positive) THEN 97 direction="up" 98 ELSE 99 direction="down" 100 ENDIF 101 ELSE 102 direction='unknown' 103 ENDIF 104 105 CALL histvert(ioipsl_file_id, TRIM(pt_axis%name),TRIM(pt_axis%description), & 106 TRIM(pt_axis%unit), pt_axis%size,pt_axis%values, ioipsl_axis_id, & 107 pdirect=direction) 108 CALL sorted_list__add(axis_id,hash(Pt_axis%name),ioipsl_axis_id) 109 ENDIF 76 110 ENDIF 77 END IF78 ENDDO79 80 DO j=1,pt_file_dep%fields%size81 pt_field=>pt_file_dep%fields%at(j)%pt82 IF (pt_field%axis%name=="none") THEN83 pt_field%internal(id_file)=ioipsl_file_id84 CALL histdef(ioipsl_file_id, TRIM(pt_field%name), pt_field%description,&85 & pt_field%unit, pt_field%grid%domain%ni, pt_field%grid%domain%nj,&86 & ioipsl_hori_id, 1, 1, 1, -99, 32, pt_field%operation, &87 & real(pt_field%freq_op), real(pt_file%output_freq) )88 ELSE89 pt_field%internal(id_file)=ioipsl_file_id90 CALL sorted_list__find(axis_id,hash(Pt_field%axis%name),ioipsl_axis_id,found)91 CALL histdef(ioipsl_file_id, TRIM(pt_field%name), pt_field%description,&92 & pt_field%unit, pt_field%grid%domain%ni, pt_field%grid%domain%nj,&93 & ioipsl_hori_id, pt_field%axis%size, 1, pt_field%axis%size,&94 & ioipsl_axis_id, 32, pt_field%operation, real(pt_field%freq_op), &95 & real(pt_file%output_freq) )96 END IF97 ENDDO98 CALL histend(ioipsl_file_id)111 ENDDO 112 113 DO j=1,pt_file_dep%fields%size 114 pt_field=>pt_file_dep%fields%at(j)%pt 115 IF (pt_field%axis%name=="none") THEN 116 pt_field%internal(id_file)=ioipsl_file_id 117 CALL histdef(ioipsl_file_id, TRIM(pt_field%name), pt_field%description, & 118 & pt_field%unit, pt_field%grid%domain%ni, pt_field%grid%domain%nj, & 119 & ioipsl_hori_id, 1, 1, 1, -99, 32, pt_field%operation, & 120 & real(pt_field%freq_op), real(pt_file%output_freq) ) 121 ELSE 122 pt_field%internal(id_file)=ioipsl_file_id 123 CALL sorted_list__find(axis_id,hash(Pt_field%axis%name),ioipsl_axis_id,found) 124 CALL histdef(ioipsl_file_id, TRIM(pt_field%name), pt_field%description, & 125 & pt_field%unit, pt_field%grid%domain%ni, pt_field%grid%domain%nj, & 126 & ioipsl_hori_id, pt_field%axis%size, 1, pt_field%axis%size, & 127 & ioipsl_axis_id, 32, pt_field%operation, real(pt_field%freq_op), & 128 & real(pt_file%output_freq) ) 129 ENDIF 130 ENDDO 131 CALL histend(ioipsl_file_id) 132 ENDIF 99 133 CALL sorted_list__delete(axis_id) 100 134 ENDDO … … 128 162 DO i=1,pt_field_base%field_out%size 129 163 pt_field=>pt_field_base%field_out%at(i)%pt%field 130 ioipsl_file_id=pt_field%internal(id_file) 131 CALL histwrite(ioipsl_file_id, TRIM(pt_field%name), timestep_number, var, size(var), nindex) 164 IF ( pt_field%zoom%ni_loc * pt_field%zoom%nj_loc > 0) THEN 165 ioipsl_file_id=pt_field%internal(id_file) 166 CALL histwrite(ioipsl_file_id, TRIM(pt_field%name), timestep_number, var, size(var), nindex) 167 ENDIF 132 168 ENDDO 133 169 ENDIF … … 158 194 DO i=1,pt_field_base%field_out%size 159 195 pt_field=>pt_field_base%field_out%at(i)%pt%field 160 ioipsl_file_id=pt_field%internal(id_file) 161 CALL histwrite(ioipsl_file_id, TRIM(pt_field%name), timestep_number, var, size(var), nindex) 196 IF ( pt_field%zoom%ni_loc * pt_field%zoom%nj_loc > 0) THEN 197 ioipsl_file_id=pt_field%internal(id_file) 198 CALL histwrite(ioipsl_file_id, TRIM(pt_field%name), timestep_number, var, size(var), nindex) 199 ENDIF 162 200 ENDDO 163 201 ENDIF -
XMLIO_SERVER/trunk/src/XMLIO/create_template
r26 r29 23 23 template field_out 24 24 template context 25 template zoom -
XMLIO_SERVER/trunk/src/XMLIO/mod_axis.f90
r26 r29 18 18 CHARACTER(len=str_len) :: unit 19 19 LOGICAL :: has_unit 20 LOGICAL :: positive 21 LOGICAL :: has_positive 20 22 REAL, DIMENSION(:), POINTER :: values 21 23 LOGICAL :: has_values … … 74 76 INTEGER :: Pos 75 77 76 pt_axis%has_id = .FALSE.78 pt_axis%has_id = .FALSE. 77 79 pt_axis%has_name = .FALSE. 78 80 pt_axis%has_size = .FALSE. … … 80 82 pt_axis%has_unit = .FALSE. 81 83 pt_axis%has_values = .FALSE. 82 84 pt_axis%has_positive = .FALSE. 85 83 86 IF (PRESENT(Id)) THEN 84 87 Pt_axis%id=TRIM(ADJUSTL(Id)) … … 90 93 END SUBROUTINE axis__new 91 94 92 SUBROUTINE axis__set(pt_axis, name, description, unit, a_size, values )95 SUBROUTINE axis__set(pt_axis, name, description, unit, a_size, values, positive) 93 96 IMPLICIT NONE 94 97 TYPE(axis), POINTER :: pt_axis … … 98 101 INTEGER ,OPTIONAL :: a_size 99 102 REAL, DIMENSION(:),OPTIONAL :: values 103 LOGICAL ,OPTIONAL :: positive 100 104 101 105 IF (PRESENT(name)) THEN … … 126 130 ENDIF 127 131 132 IF (PRESENT(positive)) then 133 pt_axis%positive=positive 134 pt_axis%has_positive = .TRUE. 135 ENDIF 136 128 137 END SUBROUTINE axis__set 129 138 … … 167 176 ELSE 168 177 PRINT *,"values undefined" 178 ENDIF 179 180 IF (pt_axis%has_positive) THEN 181 PRINT *,"positive = ",pt_axis%positive 182 ELSE 183 PRINT *,"positive undefined" 169 184 ENDIF 170 185 … … 224 239 ELSE 225 240 pt_axis_out%has_values=.FALSE. 241 ENDIF 242 243 IF (pt_axis_in%has_positive) THEN 244 pt_axis_out%positive=pt_axis_in%positive 245 pt_axis_out%has_positive=.TRUE. 246 ELSE IF ( pt_axis_default%has_positive ) THEN 247 pt_axis_out%positive=pt_axis_default%positive 248 pt_axis_out%has_positive=.TRUE. 249 ELSE 250 pt_axis_out%has_positive=.FALSE. 226 251 ENDIF 227 252 -
XMLIO_SERVER/trunk/src/XMLIO/mod_context.f90
r28 r29 9 9 USE mod_file_definition 10 10 USE mod_grid 11 USE mod_zoom 11 12 USE mod_grid_group 12 13 USE mod_grid_definition … … 38 39 TYPE(vector_grid),POINTER :: grid__grid_Ids 39 40 TYPE(sorted_list),POINTER :: grid__Ids 41 TYPE(vector_zoom),POINTER :: zoom__zoom_Ids 42 TYPE(sorted_list),POINTER :: zoom__Ids 40 43 TYPE(vector_grid_group),POINTER :: grid_group__grid_group_Ids 41 44 TYPE(sorted_list),POINTER :: grid_group__Ids … … 125 128 ALLOCATE(pt_context%grid__grid_Ids) 126 129 ALLOCATE(pt_context%grid__Ids) 130 ALLOCATE(pt_context%zoom__zoom_Ids) 131 ALLOCATE(pt_context%zoom__Ids) 127 132 ALLOCATE(pt_context%grid_group__grid_group_Ids) 128 133 ALLOCATE(pt_context%grid_group__Ids) … … 156 161 CALL grid_definition__Init 157 162 163 CALL zoom__init 164 158 165 CALL file__init 159 166 CALL file_group__Init … … 210 217 CALL file_definition__swap_context(Pt_context%file_definition__file_definition) 211 218 CALL grid__swap_context(pt_context%grid__grid_Ids,pt_context%grid__Ids) 219 CALL zoom__swap_context(pt_context%zoom__zoom_Ids,pt_context%zoom__Ids) 212 220 CALL grid_group__swap_context(pt_context%grid_group__grid_group_Ids,pt_context%grid_group__Ids) 213 221 CALL grid_definition__swap_context(pt_context%grid_definition__grid_definition) -
XMLIO_SERVER/trunk/src/XMLIO/mod_dependency.f90
r26 r29 5 5 USE mod_axis 6 6 USE mod_sorted_list 7 USE mod_zoom 7 8 8 9 TYPE file_dep … … 11 12 TYPE(vector_field),POINTER :: fields 12 13 TYPE(vector_grid),POINTER :: grids 14 TYPE(vector_zoom),POINTER :: zooms 13 15 TYPE(vector_axis),POINTER :: axis 14 16 END TYPE file_dep … … 26 28 TYPE(axis), POINTER :: axis 27 29 TYPE(grid), POINTER :: grid 30 TYPE(zoom), POINTER :: zoom 28 31 END TYPE field_out 29 32 … … 82 85 TYPE (sorted_list),POINTER :: sorted_axis 83 86 TYPE (sorted_list),POINTER :: sorted_grid 87 TYPE (sorted_list),POINTER :: sorted_zoom 84 88 INTEGER :: i 85 89 INTEGER :: j … … 87 91 ALLOCATE(sorted_axis) 88 92 ALLOCATE(sorted_grid) 93 ALLOCATE(sorted_zoom) 89 94 90 95 IF (PRESENT(Pt_file_group)) THEN … … 106 111 ALLOCATE(Pt_file_dep%fields) 107 112 ALLOCATE(Pt_file_dep%grids) 113 ALLOCATE(Pt_file_dep%zooms) 108 114 ALLOCATE(Pt_file_dep%axis) 109 115 pt_file_dep%file=>pt_file … … 111 117 CALL vector_field__new(Pt_file_dep%fields) 112 118 CALL vector_grid__new(Pt_file_dep%grids) 119 CALL vector_zoom__new(Pt_file_dep%zooms) 113 120 CALL vector_axis__new(Pt_file_dep%axis) 114 121 CALL sorted_list__new(sorted_axis) 115 122 CALL sorted_list__new(sorted_grid) 123 CALL sorted_list__new(sorted_zoom) 116 124 117 125 CALL Treat_field_group(pt_file%field_list) … … 119 127 CALL sorted_list__delete(sorted_axis) 120 128 CALL sorted_list__delete(sorted_grid) 129 CALL sorted_list__delete(sorted_zoom) 121 130 ENDIF 122 131 ENDDO … … 152 161 CALL vector_grid__set_new(pt_file_dep%grids,Pt_field%grid,pos) 153 162 CALL sorted_list__add(sorted_grid,hash(Pt_field%grid%id),pos) 163 ENDIF 164 ENDIF 165 166 IF (Pt_field%has_zoom) THEN 167 CALL sorted_list__find(sorted_zoom,hash(Pt_field%zoom%id),pos,found) 168 IF (.NOT. found) THEN 169 CALL vector_zoom__set_new(pt_file_dep%zooms,Pt_field%zoom,pos) 170 CALL sorted_list__add(sorted_zoom,hash(Pt_field%zoom%id),pos) 154 171 ENDIF 155 172 ENDIF … … 185 202 pt_field_out%axis=>pt_field_out%field%axis 186 203 pt_field_out%grid=>pt_field_out%field%grid 204 pt_field_out%zoom=>pt_field_out%field%zoom 187 205 ENDDO 188 206 ENDDO -
XMLIO_SERVER/trunk/src/XMLIO/mod_domain.f90
r26 r29 1 1 MODULE mod_domain 2 2 USE mod_xmlio_parameters 3 4 3 INTEGER, PARAMETER :: box=1 5 4 INTEGER, PARAMETER :: orange=2 -
XMLIO_SERVER/trunk/src/XMLIO/mod_field.f90
r26 r29 5 5 USE mod_axis 6 6 USE mod_grid 7 7 USE mod_zoom 8 8 9 IMPLICIT NONE 9 10 … … 25 26 CHARACTER(len=str_len) :: grid_ref 26 27 LOGICAL :: has_grid_ref 28 CHARACTER(len=str_len) :: zoom_ref 29 LOGICAL :: has_zoom_ref 27 30 INTEGER :: level 28 31 LOGICAL :: has_level … … 40 43 TYPE(grid),POINTER :: grid 41 44 LOGICAL :: has_grid 45 TYPE(zoom),POINTER :: zoom 46 LOGICAL :: has_zoom 42 47 INTEGER :: internal(internal_field) 43 48 … … 107 112 pt_field%has_axis_ref = .FALSE. 108 113 pt_field%has_grid_ref = .FALSE. 114 pt_field%has_zoom_ref = .FALSE. 109 115 pt_field%has_prec = .FALSE. 110 116 pt_field%has_level = .FALSE. … … 115 121 Pt_field%has_axis=.FALSE. 116 122 Pt_field%has_grid=.FALSE. 123 Pt_field%has_zoom=.FALSE. 117 124 118 125 IF (PRESENT(Id)) THEN … … 126 133 127 134 128 SUBROUTINE field__set(p_field, name, ref, description, unit, operation, freq_op, axis_ref, grid_ref, prec, level, enabled)135 SUBROUTINE field__set(p_field, name, ref, description, unit, operation, freq_op, axis_ref, grid_ref, zoom_ref, prec, level, enabled) 129 136 130 137 TYPE(field), pointer :: p_field … … 137 144 CHARACTER(len=*),OPTIONAL :: axis_ref 138 145 CHARACTER(len=*),OPTIONAL :: grid_ref 146 CHARACTER(len=*),OPTIONAL :: zoom_ref 139 147 INTEGER, OPTIONAL :: prec 140 148 INTEGER, OPTIONAL :: level … … 174 182 p_field%has_grid_ref = .TRUE. 175 183 ENDIF 184 185 IF (PRESENT(zoom_ref)) THEN 186 p_field%zoom_ref=TRIM(ADJUSTL(zoom_ref)) 187 p_field%has_zoom_ref = .TRUE. 188 ENDIF 189 176 190 IF (PRESENT(prec)) then 177 191 p_field%prec=prec … … 240 254 ELSE 241 255 PRINT *, 'grid_ref undefined ' 256 ENDIF 257 258 IF (pt_field%has_zoom_ref) THEN 259 PRINT *, 'zoom_ref : ',TRIM(pt_field%zoom_ref) 260 ELSE 261 PRINT *, 'zoom_ref undefined ' 242 262 ENDIF 243 263 … … 378 398 ELSE 379 399 pt_field_out%has_grid_ref=.FALSE. 400 ENDIF 401 402 IF (pt_field_in%has_zoom_ref) THEN 403 pt_field_out%zoom_ref=pt_field_in%zoom_ref 404 pt_field_out%has_zoom_ref=.TRUE. 405 ELSE IF ( pt_field_default%has_zoom_ref ) THEN 406 pt_field_out%zoom_ref=pt_field_default%zoom_ref 407 pt_field_out%has_zoom_ref=.TRUE. 408 ELSE 409 pt_field_out%has_zoom_ref=.FALSE. 380 410 ENDIF 381 411 … … 526 556 END SUBROUTINE field__solve_grid_ref 527 557 558 SUBROUTINE field__solve_zoom_ref(pt_field) 559 USE error_msg 560 IMPLICIT NONE 561 TYPE(field), POINTER :: pt_field 562 563 IF (.NOT. pt_field%has_zoom_ref) THEN 564 IF (pt_field%has_grid_ref) THEN 565 pt_field%has_zoom_ref=.TRUE. 566 pt_field%zoom_ref=pt_field%grid_ref 567 ENDIF 568 ENDIF 569 570 IF (pt_field%has_zoom_ref) THEN 571 CALL zoom__get(pt_field%zoom_ref,pt_field%zoom) 572 IF (ASSOCIATED(pt_field%zoom)) THEN 573 pt_field%has_zoom=.TRUE. 574 ELSE 575 WRITE (message,*) "The field : id = ",pt_field%id," name = ",Pt_field%name, & 576 " has a unknown reference to zoom : id =",pt_field%zoom_ref 577 CALL error("mod_field::field__solve_zoom_ref") 578 ENDIF 579 ENDIF 580 581 END SUBROUTINE field__solve_zoom_ref 528 582 529 583 -
XMLIO_SERVER/trunk/src/XMLIO/mod_field_group.f90
r26 r29 158 158 CALL field_group__solve_axis_ref(Pt_fg) 159 159 CALL field_group__solve_grid_ref(Pt_fg) 160 CALL field_group__solve_zoom_ref(Pt_fg) 160 161 161 162 END SUBROUTINE field_group__solve_ref … … 208 209 209 210 END SUBROUTINE field_group__solve_grid_ref 211 212 RECURSIVE SUBROUTINE field_group__solve_zoom_ref(Pt_fg) 213 IMPLICIT NONE 214 TYPE(field_group),POINTER :: Pt_fg 215 216 INTEGER :: i 217 218 DO i=1,Pt_fg%groups%size 219 CALL field_group__solve_zoom_ref(Pt_fg%groups%at(i)%pt) 220 ENDDO 221 222 DO i=1,Pt_fg%fields%size 223 CALL field__solve_zoom_ref(Pt_fg%fields%at(i)%pt) 224 ENDDO 225 226 END SUBROUTINE field_group__solve_zoom_ref 210 227 211 228 RECURSIVE SUBROUTINE field_group__print(Pt_fg) -
XMLIO_SERVER/trunk/src/XMLIO/mod_grid.f90
r26 r29 3 3 USE mod_sorted_list 4 4 USE mod_domain 5 USE mod_zoom 6 5 7 IMPLICIT NONE 6 8 … … 19 21 INTEGER :: nj 20 22 LOGICAL :: has_dimension 23 TYPE(vector_zoom),POINTER :: associated_zoom 24 TYPE(zoom),POINTER :: global_zoom 21 25 END TYPE grid 22 26 … … 75 79 ALLOCATE(pt_grid%subdomain) 76 80 ALLOCATE(pt_grid%rank_ids) 81 ALLOCATE(pt_grid%associated_zoom) 82 77 83 CALL domain__new(pt_grid%domain) 78 84 CALL vector_domain__new(pt_grid%subdomain) 79 85 CALL sorted_list__new(pt_grid%rank_ids) 86 CALL vector_zoom__new(pt_grid%associated_zoom) 80 87 81 88 pt_grid%has_id = .FALSE. … … 90 97 CALL sorted_list__Add(Ids,hash(id),Pos) 91 98 ENDIF 99 100 CALL grid__get_new_zoom(pt_grid,pt_grid%global_zoom,id) 92 101 93 102 END SUBROUTINE grid__new … … 160 169 TYPE(grid), POINTER :: pt_grid 161 170 TYPE(domain),POINTER :: subdomain 171 TYPE(zoom),POINTER :: pt_zoom 162 172 163 173 REAL,ALLOCATABLE :: lon(:,:) 164 174 REAL,ALLOCATABLE :: lat(:,:) 165 INTEGER :: ib,ie,jb,je,ni,nj,ibegin,jbegin 175 INTEGER :: ib,ie,jb,je,ni,nj,ibegin,jbegin,iend,jend 166 176 INTEGER :: i 167 177 … … 203 213 204 214 CALL domain__set(pt_grid%domain,0,ni,nj,ibegin,jbegin,lon,lat) 205 206 215 iend=ibegin+ni-1 216 jend=jbegin+nj-1 217 218 219 pt_grid%global_zoom%ni_glo=pt_grid%ni 220 pt_grid%global_zoom%nj_glo=pt_grid%nj 221 pt_grid%global_zoom%ibegin_glo=1 222 pt_grid%global_zoom%jbegin_glo=1 223 224 DO i=1,pt_grid%associated_zoom%size 225 pt_zoom=>pt_grid%associated_zoom%at(i)%pt 226 227 ib=MAX(pt_zoom%ibegin_glo-ibegin+1,1) 228 ie=MIN(pt_zoom%ibegin_glo+pt_zoom%ni_glo-ibegin,ni) 229 pt_zoom%ni_loc=MAX(ie-ib+1,0) 230 pt_zoom%ibegin_loc=ib 231 232 jb=MAX(pt_zoom%jbegin_glo-jbegin+1,1) 233 je=MIN(pt_zoom%jbegin_glo+pt_zoom%nj_glo-jbegin,nj) 234 pt_zoom%nj_loc=MAX(je-jb+1,0) 235 pt_zoom%jbegin_loc=jb 236 ENDDO 237 238 207 239 DEALLOCATE(lon) 208 240 DEALLOCATE(lat) … … 211 243 212 244 213 245 SUBROUTINE grid__get_new_zoom(pt_grid,pt_zoom,zoom_id) 246 USE string_function 247 IMPLICIT NONE 248 TYPE(grid), POINTER :: pt_grid 249 TYPE(zoom),POINTER :: pt_zoom 250 CHARACTER(LEN=*),INTENT(IN),OPTIONAL :: zoom_id 251 LOGICAL :: success 252 253 CALL vector_zoom__get_new(pt_grid%associated_zoom,Pt_zoom) 254 CALL zoom__new(Pt_zoom,zoom_id) 255 256 END SUBROUTINE grid__get_new_zoom 257 214 258 SUBROUTINE grid__print(pt_grid) 215 259 IMPLICIT NONE -
XMLIO_SERVER/trunk/src/XMLIO/mod_parse_xml.f90
r26 r29 255 255 CALL axis__set(pt_axis,a_size=string_to_integer(value)) 256 256 ENDIF 257 258 IF (is_attribute_exist(node,"positive")) THEN 259 value = getAttribute(node,"positive") 260 CALL axis__set(pt_axis,positive=string_to_logical(value)) 261 ENDIF 257 262 258 263 END SUBROUTINE parsing_axis_attribute … … 333 338 TYPE(grid_group),POINTER :: parent 334 339 335 TYPE(grid),POINTER :: pt_grid 336 TYPE(grid),POINTER :: attribute 340 TYPE(grid),POINTER :: pt_grid 341 TYPE(fnode), POINTER :: child_node 342 TYPE(fnodeList), POINTER :: child_list 337 343 INTEGER :: il 338 344 CHARACTER(len=100) :: node_name … … 348 354 349 355 CALL parsing_grid_attribute(node,pt_grid) 356 357 358 IF (hasChildNodes(node)) THEN 359 child_list => getChildnodes(node) 360 361 DO il=0,getLength(child_list)-1 362 child_node => item(child_list,il) 363 node_name=getNodename(child_node) 364 365 SELECT CASE (TRIM(node_name)) 366 367 CASE ('zoom') 368 CALL parsing_zoom(child_node,pt_grid) 369 370 CASE DEFAULT 371 IF (is_bad_node(node_name)) THEN 372 WRITE(message,*) 'Unknown node <<',TRIM(node_name),'>> while parsing grid' 373 CALL Warning("mod_parse_xml:parsing_grid") 374 ENDIF 375 END SELECT 376 ENDDO 377 ENDIF 350 378 351 379 END SUBROUTINE parsing_grid 352 380 353 354 381 SUBROUTINE parsing_grid_attribute(node,pt_grid) 355 382 USE mod_grid … … 372 399 END SUBROUTINE parsing_grid_attribute 373 400 374 375 376 401 SUBROUTINE parsing_zoom(node,parent) 402 USE mod_zoom 403 USE mod_grid 404 IMPLICIT NONE 405 TYPE(fnode), POINTER :: node 406 TYPE(grid),POINTER :: parent 407 408 TYPE(zoom),POINTER :: pt_zoom 409 INTEGER :: il 410 CHARACTER(len=100) :: node_name 411 CHARACTER(len=100) :: value 412 413 414 IF (is_attribute_exist(node,"id")) THEN 415 value=getAttribute(node,"id") 416 CALL grid__get_new_zoom(parent,pt_zoom,TRIM(value)) 417 ELSE 418 CALL grid__get_new_zoom(parent,pt_zoom) 419 ENDIF 420 421 CALL parsing_zoom_attribute(node,pt_zoom) 422 423 END SUBROUTINE parsing_zoom 424 425 426 SUBROUTINE parsing_zoom_attribute(node,pt_zoom) 427 USE mod_zoom 428 IMPLICIT NONE 429 TYPE(fnode), POINTER :: node 430 TYPE(zoom),POINTER :: pt_zoom 431 432 CHARACTER(len=100) :: value 433 434 IF (is_attribute_exist(node,"name")) THEN 435 value = getAttribute(node,"name") 436 CALL zoom__set(pt_zoom,name=TRIM(value)) 437 ENDIF 438 439 IF (is_attribute_exist(node,"description")) THEN 440 value = getAttribute(node,"description") 441 CALL zoom__set(pt_zoom,description=TRIM(value)) 442 ENDIF 443 444 IF (is_attribute_exist(node,"ni")) THEN 445 value = getAttribute(node,"ni") 446 CALL zoom__set(pt_zoom,ni_glo=string_to_integer(value)) 447 ENDIF 448 449 IF (is_attribute_exist(node,"nj")) THEN 450 value = getAttribute(node,"nj") 451 CALL zoom__set(pt_zoom,nj_glo=string_to_integer(value)) 452 ENDIF 453 454 IF (is_attribute_exist(node,"ibegin")) THEN 455 value = getAttribute(node,"ibegin") 456 CALL zoom__set(pt_zoom,ibegin_glo=string_to_integer(value)) 457 ENDIF 458 459 IF (is_attribute_exist(node,"jbegin")) THEN 460 value = getAttribute(node,"jbegin") 461 CALL zoom__set(pt_zoom,jbegin_glo=string_to_integer(value)) 462 ENDIF 463 464 END SUBROUTINE parsing_zoom_attribute 377 465 378 466 … … 508 596 ENDIF 509 597 598 IF (is_attribute_exist(node,"zoom_ref")) THEN 599 value = getAttribute(node,"zoom_ref") 600 CALL field__set(pt_field,zoom_ref=TRIM(value)) 601 ENDIF 602 510 603 IF (is_attribute_exist(node,"level")) THEN 511 604 value = getAttribute(node,"level") -
XMLIO_SERVER/trunk/src/XMLIO/vector_context_contains.inc
r26 r29 72 72 SUBROUTINE vector_context__increase(vect) 73 73 TYPE(vector_context), INTENT(INOUT) :: vect 74 TYPE (Pt_context ), POINTER, DIMENSION(:) :: Pt_tmp74 TYPE (Pt_context__), POINTER, DIMENSION(:) :: Pt_tmp 75 75 INTEGER :: new_size 76 76 INTEGER :: i -
XMLIO_SERVER/trunk/src/XMLIO/vector_context_def.inc
r26 r29 1 1 2 TYPE ,PRIVATE :: Pt_context2 TYPE Pt_context__ 3 3 TYPE (context),POINTER :: Pt 4 4 LOGICAL :: owned 5 END TYPE Pt_context 5 END TYPE Pt_context__ 6 6 7 7 TYPE vector_context 8 8 9 TYPE (Pt_context ), POINTER, DIMENSION(:) :: at => NULL()9 TYPE (Pt_context__), POINTER, DIMENSION(:) :: at => NULL() 10 10 INTEGER :: size 11 11
Note: See TracChangeset
for help on using the changeset viewer.