Ignore:
Timestamp:
Nov 6, 2008 8:54:02 AM (13 years ago)
Author:
raasch
Message:

updates in dvr routines for new dvr version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/data_output_dvrp.f90

    r139 r210  
    3232! Actual revisions:
    3333! -----------------
    34 !
     34! DVRP arguments changed to single precision, mode pathlines added
    3535! TEST: different colours for isosurfaces
    3636! TEST: write statements
     
    7272    USE arrays_3d
    7373    USE cloud_parameters
     74    USE constants
    7475    USE cpulog
    7576    USE DVRP
     
    8788    CHARACTER (LEN=2) ::  section_chr
    8889    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
    9092    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
    9499
    95100
     
    112117!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: vor steering_update'
    113118!   CALL local_flush( 9 )
    114           CALL DVRP_STEERING_UPDATE( m-1, data_output_dvrp )
     119!          CALL DVRP_STEERING_UPDATE( m-1, data_output_dvrp )
    115120!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: nach steering_update'
    116121!   CALL local_flush( 9 )
     
    157162!
    158163!--       Definition of characteristics of particle material
    159 !          CALL DVRP_MATERIAL_RGB( m-1, 1, 0.1, 0.7, 0.1, 0.0 )
    160           CALL DVRP_MATERIAL_RGB( m-1, 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( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    161167
    162168!
     
    437443!
    438444!--          Definition of characteristics of isosurface material
    439 !--          Preliminary settings for w!
     445!--          Preliminary settings for w and pt!
    440446             IF ( output_variable == 'w' )  THEN
    441447                IF ( tv == 1 )  THEN
    442                    CALL DVRP_MATERIAL_RGB( m-1, 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( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    443450                ELSE
    444                    CALL DVRP_MATERIAL_RGB( m-1, 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( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    445453                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( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    446457             ELSE
    447                 CALL DVRP_MATERIAL_RGB( m-1, 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( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    448460             ENDIF
    449461
     
    452464             CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, &
    453465                             cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
    454              CALL DVRP_THRESHOLD( m-1, threshold(tv) )
    455              CALL DVRP_VISUALIZE( m-1, 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( m-1, c_size_x, c_size_y, c_size_z )
     469
     470             c_mode   = vc_mode
     471             CALL DVRP_CLUSTERING_MODE( m-1, c_mode )
     472
     473             gradient_normals = vc_gradient_normals
     474             CALL DVRP_GRADIENTNORMALS( m-1, 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( -(m-1)-1, tmp_c_alpha )
     480
     481             tmp_th = threshold(tv)
     482             CALL DVRP_THRESHOLD( m-1, tmp_th )
     483             CALL DVRP_VISUALIZE( m-1, 21, dvrp_filecount )
     484
    456485!   WRITE ( 9, * ) '*** myid=', myid, ' data_output_dvrp: ende isosurface'
    457486!   CALL local_flush( 9 )
     
    469498!
    470499!--          Material and color definitions
    471              CALL DVRP_MATERIAL_RGB( m-1, 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( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    472502
    473503             islice_dvrp = islice_dvrp + 1
     
    487517                             cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
    488518!             CALL DVRP_SLICER( m-1, section_mode, slicer_position )
    489              CALL DVRP_SLICER( m-1, 2, 1.0 )
     519             tmp_pos = 1.0
     520             CALL DVRP_SLICER( m-1, 2, tmp_pos )
    490521             WRITE (9,*) 'nx_dvrp=', nx_dvrp
    491522             WRITE (9,*) 'ny_dvrp=', ny_dvrp
     
    505536          DEALLOCATE( local_pf )
    506537
     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( m-1, local_pfi, 4, nx_dvrp, ny_dvrp, nz_dvrp, &
     562                          cyclic_dvrp, cyclic_dvrp, cyclic_dvrp )
     563          CALL DVRP_VISUALIZE( m-1, 20, dvrp_filecount )
     564
     565          CALL cpu_log( log_point_s(31), 'dvrp_pathlines', 'stop' )
     566
     567          DEALLOCATE( local_pfi )
     568
    507569       ENDIF
    508570
Note: See TracChangeset for help on using the changeset viewer.