Changeset 210 for palm/trunk/SOURCE/data_output_dvrp.f90
 Timestamp:
 Nov 6, 2008 8:54:02 AM (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/data_output_dvrp.f90
r139 r210 32 32 ! Actual revisions: 33 33 !  34 ! 34 ! DVRP arguments changed to single precision, mode pathlines added 35 35 ! TEST: different colours for isosurfaces 36 36 ! TEST: write statements … … 72 72 USE arrays_3d 73 73 USE cloud_parameters 74 USE constants 74 75 USE cpulog 75 76 USE DVRP … … 87 88 CHARACTER (LEN=2) :: section_chr 88 89 CHARACTER (LEN=6) :: output_variable 89 INTEGER :: i, j, k, l, m, n, nn, section_mode, tv, vn 90 INTEGER :: c_mode, c_size_x, c_size_y, c_size_z, gradient_normals, i, j, & 91 k, l, m, n, nn, section_mode, tv, vn 90 92 INTEGER, DIMENSION(:), ALLOCATABLE :: p_c, p_t 91 REAL :: center(3), distance, slicer_position, surface_value 92 REAL, DIMENSION(:), ALLOCATABLE :: psize, p_x, p_y, p_z 93 REAL, DIMENSION(:,:,:), ALLOCATABLE :: local_pf 93 REAL(4) :: center(3), distance, slicer_position, surface_value, & 94 tmp_alpha, tmp_alpha_w, tmp_b, tmp_c_alpha, tmp_g, tmp_norm, & 95 tmp_pos, tmp_r, tmp_t, tmp_th 96 REAL(4), DIMENSION(:), ALLOCATABLE :: psize, p_x, p_y, p_z 97 REAL(4), DIMENSION(:,:,:), ALLOCATABLE :: local_pf 98 REAL(4), DIMENSION(:,:,:,:), ALLOCATABLE :: local_pfi 94 99 95 100 … … 112 117 ! WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: vor steering_update' 113 118 ! CALL local_flush( 9 ) 114 CALL DVRP_STEERING_UPDATE( m1, data_output_dvrp )119 ! CALL DVRP_STEERING_UPDATE( m1, data_output_dvrp ) 115 120 ! WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: nach steering_update' 116 121 ! CALL local_flush( 9 ) … … 157 162 ! 158 163 ! Definition of characteristics of particle material 159 ! CALL DVRP_MATERIAL_RGB( m1, 1, 0.1, 0.7, 0.1, 0.0 ) 160 CALL DVRP_MATERIAL_RGB( m1, 1, 0.0, 0.0, 0.0, 0.0 ) 164 ! tmp_r = 0.1; tmp_g = 0.7; tmp_b = 0.1; tmp_t = 0.0 165 tmp_r = 0.0; tmp_g = 0.0; tmp_b = 0.0; tmp_t = 0.0 166 CALL DVRP_MATERIAL_RGB( m1, 1, tmp_r, tmp_g, tmp_b, tmp_t ) 161 167 162 168 ! … … 437 443 ! 438 444 ! Definition of characteristics of isosurface material 439 ! Preliminary settings for w !445 ! Preliminary settings for w and pt! 440 446 IF ( output_variable == 'w' ) THEN 441 447 IF ( tv == 1 ) THEN 442 CALL DVRP_MATERIAL_RGB( m1, 1, 0.8, 0.1, 0.1, 0.0 ) 448 tmp_r = 0.8; tmp_g = 0.1; tmp_b = 0.1; tmp_t = 0.0 449 CALL DVRP_MATERIAL_RGB( m1, 1, tmp_r, tmp_g, tmp_b, tmp_t ) 443 450 ELSE 444 CALL DVRP_MATERIAL_RGB( m1, 1, 0.1, 0.1, 0.8, 0.0 ) 451 tmp_r = 0.1; tmp_g = 0.1; tmp_b = 0.8; tmp_t = 0.0 452 CALL DVRP_MATERIAL_RGB( m1, 1, tmp_r, tmp_g, tmp_b, tmp_t ) 445 453 ENDIF 454 ELSEIF ( output_variable == 'pt' ) THEN 455 tmp_r = 0.8; tmp_g = 0.1; tmp_b = 0.1; tmp_t = 0.0 456 CALL DVRP_MATERIAL_RGB( m1, 1, tmp_r, tmp_g, tmp_b, tmp_t ) 446 457 ELSE 447 CALL DVRP_MATERIAL_RGB( m1, 1, 0.9, 0.9, 0.9, 0.0 ) 458 tmp_r = 0.9; tmp_g = 0.9; tmp_b = 0.9; tmp_t = 0.0 459 CALL DVRP_MATERIAL_RGB( m1, 1, tmp_r, tmp_g, tmp_b, tmp_t ) 448 460 ENDIF 449 461 … … 452 464 CALL DVRP_DATA( m1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, & 453 465 cyclic_dvrp, cyclic_dvrp, cyclic_dvrp ) 454 CALL DVRP_THRESHOLD( m1, threshold(tv) ) 455 CALL DVRP_VISUALIZE( m1, 1, dvrp_filecount ) 466 467 c_size_x = vc_size_x; c_size_y = vc_size_y; c_size_z = vc_size_z 468 CALL DVRP_CLUSTER_SIZE( m1, c_size_x, c_size_y, c_size_z ) 469 470 c_mode = vc_mode 471 CALL DVRP_CLUSTERING_MODE( m1, c_mode ) 472 473 gradient_normals = vc_gradient_normals 474 CALL DVRP_GRADIENTNORMALS( m1, gradient_normals ) 475 ! 476 ! A seperate procedure for setting vc_alpha will be in the next 477 ! version of libDVRP 478 tmp_c_alpha = vc_alpha 479 CALL DVRP_THRESHOLD( (m1)1, tmp_c_alpha ) 480 481 tmp_th = threshold(tv) 482 CALL DVRP_THRESHOLD( m1, tmp_th ) 483 CALL DVRP_VISUALIZE( m1, 21, dvrp_filecount ) 484 456 485 ! WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende isosurface' 457 486 ! CALL local_flush( 9 ) … … 469 498 ! 470 499 ! Material and color definitions 471 CALL DVRP_MATERIAL_RGB( m1, 1, 0.0, 0.0, 0.0, 0.0 ) 500 tmp_r = 0.0; tmp_g = 0.0; tmp_b = 0.0; tmp_t = 0.0 501 CALL DVRP_MATERIAL_RGB( m1, 1, tmp_r, tmp_g, tmp_b, tmp_t ) 472 502 473 503 islice_dvrp = islice_dvrp + 1 … … 487 517 cyclic_dvrp, cyclic_dvrp, cyclic_dvrp ) 488 518 ! CALL DVRP_SLICER( m1, section_mode, slicer_position ) 489 CALL DVRP_SLICER( m1, 2, 1.0 ) 519 tmp_pos = 1.0 520 CALL DVRP_SLICER( m1, 2, tmp_pos ) 490 521 WRITE (9,*) 'nx_dvrp=', nx_dvrp 491 522 WRITE (9,*) 'ny_dvrp=', ny_dvrp … … 505 536 DEALLOCATE( local_pf ) 506 537 538 ELSEIF ( mode_dvrp(m)(1:9) == 'pathlines' ) THEN 539 540 ALLOCATE( local_pfi(4,nxl:nxr+1,nys:nyn+1,nzb:nz_do3d) ) 541 DO i = nxl, nxr+1 542 DO j = nys, nyn+1 543 DO k = nzb, nz_do3d 544 local_pfi(1,i,j,k) = u(k,j,i) 545 local_pfi(2,i,j,k) = v(k,j,i) 546 local_pfi(3,i,j,k) = w(k,j,i) 547 tmp_norm = SQRT( u(k,j,i) * u(k,j,i) + & 548 v(k,j,i) * v(k,j,i) + & 549 w(k,j,i) * w(k,j,i) ) 550 tmp_alpha = ACOS( 0.0 * u(k,j,i) / tmp_norm + & 551 0.0 * v(k,j,i) / tmp_norm  & 552 1.0 * w(k,j,i) / tmp_norm ) 553 tmp_alpha_w = tmp_alpha / pi * 180.0 554 local_pfi(4,i,j,k) = tmp_alpha_w 555 ENDDO 556 ENDDO 557 ENDDO 558 559 CALL cpu_log( log_point_s(31), 'dvrp_pathlines', 'start' ) 560 561 CALL DVRP_DATA( m1, local_pfi, 4, nx_dvrp, ny_dvrp, nz_dvrp, & 562 cyclic_dvrp, cyclic_dvrp, cyclic_dvrp ) 563 CALL DVRP_VISUALIZE( m1, 20, dvrp_filecount ) 564 565 CALL cpu_log( log_point_s(31), 'dvrp_pathlines', 'stop' ) 566 567 DEALLOCATE( local_pfi ) 568 507 569 ENDIF 508 570
Note: See TracChangeset
for help on using the changeset viewer.