- Timestamp:
- 02/22/16 01:24:33 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
codes/icosagcm/trunk/src/geometry.f90
r362 r370 347 347 SUBROUTINE update_domain 348 348 ! copy position of generators and vertices back into domain(:)%xyz/vertex 349 ! so that XIOS gets the right values349 ! so that XIOS/create_header_gen gets the right values 350 350 USE omp_para 351 351 USE dimensions 352 USE domain_mod 352 USE domain_mod 353 USE transfert_mpi_mod 354 353 355 INTEGER :: ind,i,j,k,n 354 356 TYPE(t_domain),POINTER :: d 357 TYPE(t_field),POINTER :: xyz_glo(:), xyz_loc(:), vertex_glo(:), vertex_loc(:) 358 REAL(rstd), POINTER :: xyz(:,:), vertex(:,:) 359 360 CALL allocate_field(xyz_loc, field_t, type_real, 3) 361 CALL allocate_field(vertex_loc, field_z, type_real, 3) 362 355 363 DO ind=1,ndomain 356 364 IF (.NOT. assigned_domain(ind) .OR. .NOT. is_omp_level_master ) CYCLE 357 d=>domain(ind)358 365 CALL swap_dimensions(ind) 359 366 CALL swap_geometry(ind) 360 DO j=jj_begin,jj_end 361 DO i=ii_begin,ii_end 362 n=(j-1)*iim+i 363 d%xyz(:,i,j)=xyz_i(n,:) 367 xyz = xyz_loc(ind) 368 xyz(:,:) = xyz_i(:,:) 369 vertex = vertex_loc(ind) 370 vertex(:,:) = xyz_v(:,:) 371 END DO 372 373 CALL allocate_field_glo(xyz_glo, field_t, type_real, 3) 374 CALL allocate_field_glo(vertex_glo, field_z, type_real, 3) 375 CALL gather_field(xyz_loc, xyz_glo) 376 CALL gather_field(vertex_loc, vertex_glo) 377 CALL deallocate_field(vertex_loc) 378 CALL deallocate_field(xyz_loc) 379 380 DO ind=1,ndomain_glo 381 d=>domain_glo(ind) 382 xyz = xyz_glo(ind) 383 vertex = vertex_glo(ind) 384 DO j=d%jj_begin,d%jj_end 385 DO i=d%ii_begin,d%ii_end 386 n=(j-1)*d%iim+i 387 d%xyz(:,i,j)=xyz(n,:) 364 388 DO k=0,5 365 d%vertex(:,k,i,j) = xyz_v(n+z_pos(k+1),:)389 d%vertex(:,k,i,j) = vertex(n+d%z_pos(k+1),:) 366 390 END DO 367 391 END DO 368 392 END DO 369 393 END DO 394 395 CALL deallocate_field_glo(vertex_glo) 396 CALL deallocate_field_glo(xyz_glo) 397 370 398 END SUBROUTINE update_domain 371 399
Note: See TracChangeset
for help on using the changeset viewer.