Changeset 284


Ignore:
Timestamp:
Apr 6, 2009 6:36:10 AM (16 years ago)
Author:
raasch
Message:

further dvr updates

Location:
palm/trunk/SOURCE
Files:
5 edited

Legend:

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

    r274 r284  
    9393    CHARACTER (LEN=6) ::  output_variable
    9494    INTEGER ::  c_mode, c_size_x, c_size_y, c_size_z, dvrp_nop, dvrp_not,     &
    95                 gradient_normals, i, ip, j, jp, k, l, m, n, nn, section_mode, &
    96                 tv, vn
     95                gradient_normals, i, ip, j, jp, k, l, m, n, n_isosurfave,    &
     96                n_slicer, nn, section_mode, vn
    9797    INTEGER, DIMENSION(:), ALLOCATABLE ::  p_c, p_t
    9898
     
    111111!
    112112!-- Loop over all output modes choosed
    113     m           = 1
    114     tv          = 0  ! threshold counter
    115     islice_dvrp = 0  ! slice plane counter
     113    m            = 1
     114    n_isosurface = 0  ! isosurface counter (for threshold values and color)
     115    n_slicer     = 0  ! slice plane counter (for range of values)
    116116    DO WHILE ( mode_dvrp(m) /= ' ' )
    117117!
     
    131131          READ ( mode_dvrp(m), '(10X,I2)' )  vn
    132132          output_variable = do3d(0,vn)
    133           tv = tv + 1
     133          n_isosurface = n_isosurface + 1
    134134       ELSEIF ( mode_dvrp(m)(1:6) == 'slicer' )  THEN
    135135          READ ( mode_dvrp(m), '(6X,I2)' )  vn
     
    475475
    476476!
    477 !--          Definition of characteristics of isosurface material
    478 !--          Preliminary settings for w and pt!
    479              IF ( output_variable == 'w' )  THEN
    480                 IF ( tv == 1 )  THEN
    481                    tmp_r = 0.8;  tmp_g = 0.1;  tmp_b = 0.1;  tmp_t = 0.0
    482                    CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    483                 ELSE
    484                    tmp_r = 0.1;  tmp_g = 0.1;  tmp_b = 0.8;  tmp_t = 0.0
    485                    CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    486                 ENDIF
    487              ELSEIF ( output_variable == 'pt' )  THEN
    488                 tmp_r = 0.8;  tmp_g = 0.1;  tmp_b = 0.1;  tmp_t = 0.0
    489                 CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    490              ELSE
    491                 tmp_r = 0.9;  tmp_g = 0.9;  tmp_b = 0.9;  tmp_t = 0.0
    492                 CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    493              ENDIF
    494              WRITE(9,*) '#8.1'
    495              CALL local_flush( 9 )
     477!--          Definition of isosurface color
     478             tmp_r = isosurface_color(1,n_isosurface)
     479             tmp_g = isosurface_color(2,n_isosurface)
     480             tmp_b = isosurface_color(3,n_isosurface)
     481             tmp_t = 0.0
     482             CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    496483
    497484!
     
    525512
    526513             IF ( dvrp_overlap )  THEN
    527                 tmp_th = threshold(tv)
     514                tmp_th = threshold(n_isosurface)
    528515             ELSE
    529516                tmp_th = 1.0   ! nothing is plotted because array values are 0
     
    559546             CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    560547
    561              islice_dvrp = islice_dvrp + 1
    562 !             CALL DVRP_COLORFUNCTION( m-1, DVRP_CM_HLS, 25,                    &
    563 !                                      slicer_range_limits_dvrp(:,islice_dvrp), &
     548             n_slicer = n_slicer + 1
     549
     550!
     551!--           Using dolorfunction has not been properly tested
     552!             islice_dvrp = n_slicer
     553!             CALL DVRP_COLORFUNCTION( m-1, DVRP_CM_HLS, 25,                 &
     554!                                      slicer_range_limits_dvrp(:,n_slicer), &
    564555!                                      color_dvrp )
    565556
     557!
     558!--          Set interval of values defining the colortable
     559             CALL set_slicer_attributes_dvrp( n_slicer )
     560
     561!
     562!--          Create user-defined colortable
    566563             CALL user_dvrp_coltab( 'slicer', output_variable )
    567564
  • palm/trunk/SOURCE/init_dvrp.f90

    r279 r284  
    332332                             ycoor_dvrp, zcoor_dvrp )
    333333
    334              tmp_r = 0.8;  tmp_g = 0.7;  tmp_b = 0.6;  tmp_t = 0.0
     334             tmp_r = topography_color(1)
     335             tmp_g = topography_color(2)
     336             tmp_b = topography_color(3)
     337             tmp_t = 0.0
    335338             CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    336339
     
    455458                          ycoor_dvrp, zcoor_dvrp )
    456459
    457           tmp_r = 0.0;  tmp_g = 0.6;  tmp_b = 0.0;  tmp_t = 0.0
     460          tmp_r = groundplate_color(1)
     461          tmp_g = groundplate_color(2)
     462          tmp_b = groundplate_color(3)
     463          tmp_t = 0.0
    458464          CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t )
    459465
  • palm/trunk/SOURCE/modules.f90

    r271 r284  
    66! -----------------
    77! +clip_dvrp_*, cluster_size, color_interval, dvrpsize_interval, dvrp_overlap,
    8 ! dvrp_total_overlap, local_dvrserver_running, n*_dvrp, interval_*_dvrp_prt,
    9 ! particle_color, particle_dvrpsize in dvrp_variables
     8! dvrp_total_overlap, groundplate_color, local_dvrserver_running, n*_dvrp,
     9! interval_*_dvrp_prt, isosurface_color, particle_color, particle_dvrpsize,
     10! topography color in dvrp_variables,
    1011! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left,
    1112! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b,
     
    563564                           dvrpsize_interval = (/ 0.0, 1.0 /)
    564565
     566    REAL, DIMENSION(3) ::  groundplate_color = (/ 0.0, 0.6, 0.0 /), &
     567                           topography_color = (/ 0.8, 0.7, 0.6 /)
     568
    565569#if defined( __decalpha )
    566570    REAL, DIMENSION(2,10)  ::  slicer_range_limits_dvrp = (/ &
     
    568572                                -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, &
    569573                                -1.0, 1.0, -1.0, 1.0 /)
     574
     575    REAL, DIMENSION(3,10)  ::  isosurface_color = (/ &
     576                                0.9, 0.9, 0.9,  0.8, 0.1, 0.1,  0.1, 0.1, 0.8, &
     577                                0.1, 0.8, 0.1,  0.6, 0.1, 0.1,  0.1, 0.1, 0.6, &
     578                                0.1, 0.6, 0.1,  0.4, 0.1, 0.1,  0.1, 0.1, 0.4  &
     579                                0.1, 0.4, 0.1 /)
    570580
    571581    REAL(4), DIMENSION(2,100) ::  interval_values_dvrp, interval_h_dvrp =      &
     
    582592                                  interval_a_dvrp_prt = 0.0
    583593#else
    584     REAL, DIMENSION(2,10)  ::  slicer_range_limits_dvrp
     594    REAL, DIMENSION(2,10)     ::  slicer_range_limits_dvrp
     595
     596    REAL, DIMENSION(3,10)     ::  isosurface_color
    585597
    586598    REAL(4), DIMENSION(2,100) ::  interval_values_dvrp,                       &
     
    595607                                     -1.0, 1.0, -1.0, 1.0, -1.0, 1.0, &
    596608                                     -1.0, 1.0 /
     609
     610    DATA  isosurface_color / 0.9, 0.9, 0.9,  0.8, 0.1, 0.1,  0.1, 0.1, 0.8, &
     611                             0.1, 0.8, 0.1,  0.6, 0.1, 0.1,  0.1, 0.1, 0.6, &
     612                             0.1, 0.6, 0.1,  0.4, 0.1, 0.1,  0.1, 0.1, 0.4, &
     613                             0.1, 0.4, 0.1 /
    597614
    598615    DATA  interval_h_dvrp / 270.0, 225.0, 225.0, 180.0, 70.0, 25.0, &
  • palm/trunk/SOURCE/package_parin.f90

    r266 r284  
    44! Actual revisions:
    55! -----------------
    6 ! +clip_dvrp_*, cluster_size, color_interval, dvrpsize_interval, particle_color,
    7 ! particle_dvrpsize in dvrp_graphics_par,
     6! +clip_dvrp_*, cluster_size, color_interval, dvrpsize_interval,
     7! groundplate_color, isosurface_color, particle_color, particle_dvrpsize
     8! topography_color, in dvrp_graphics_par,
    89! parameter dvrp_psize moved from particles_par to dvrp_graphics_par
    910! Variables for dvrp-mode pathlines added
     
    5152                                  dt_dvrp, dvrpsize_interval, dvrp_directory,  &
    5253                                  dvrp_file, dvrp_host, dvrp_output,           &
    53                                   dvrp_password, dvrp_username, mode_dvrp,     &
    54                                   particle_color, particle_dvrpsize,           &
     54                                  dvrp_password, dvrp_username,                &
     55                                  groundplate_color, isosurface_color,         &
     56                                  mode_dvrp, particle_color, particle_dvrpsize,&
    5557                                  pathlines_fadeintime, pathlines_fadeouttime, &
    5658                                  pathlines_linecount, pathlines_maxhistory,   &
     
    5860                                  slicer_range_limits_dvrp, superelevation,    &
    5961                                  superelevation_x, superelevation_y,          &
    60                                   threshold, vc_alpha, vc_gradient_normals,    &
    61                                   vc_mode, vc_size_x, vc_size_y, vc_size_z
     62                                  threshold, topography_color, vc_alpha,       &
     63                                  vc_gradient_normals, vc_mode, vc_size_x,     &
     64                                  vc_size_y, vc_size_z
    6265
    6366    NAMELIST /particles_par/      bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,    &
  • palm/trunk/SOURCE/set_slicer_attributes_dvrp.f90

    r280 r284  
    1  SUBROUTINE set_slicer_attributes_dvrp
     1 SUBROUTINE set_slicer_attributes_dvrp( n_slicer )
    22
    33!------------------------------------------------------------------------------!
     
    2323    IMPLICIT NONE
    2424
    25 !    INTEGER :: 
    26 !    REAL    :: 
     25    INTEGER ::  j, n_slicer
     26    REAL    ::  maxv, meav, minv
     27
    2728
    2829!
    29 !-- Set particle color
     30!-- Set interval values to user settings.
     31!-- The middle of this interval defines the change from blue to yellow
     32    minv = slicer_range_limits_dvrp(1,n_slicer)
     33    maxv = slicer_range_limits_dvrp(2,n_slicer)
     34    meav = ( minv + maxv ) * 0.5
     35
     36!
     37!-- Create appropriate colortable with 100 entries.
     38!-- This table ranges from deep blue (min) to deep red (max)
     39    DO  j = 1, 50
     40       interval_values_dvrp(1,j) = minv + (meav-minv) * (j-1.0) / 50.0
     41       interval_values_dvrp(2,j) = minv + (meav-minv) * (  j  ) / 50.0
     42       interval_h_dvrp(:,j) = 270.0 - ( j - 1.0 ) * 90.0 / 49.0
     43    ENDDO
     44
     45    DO  j = 51, 100
     46       interval_values_dvrp(1,j) = meav + (maxv-meav) * (j-51.0) / 50.0
     47       interval_values_dvrp(2,j) = meav + (maxv-meav) * (j-50.0) / 50.0
     48       interval_h_dvrp(:,j) = 70.0 - ( j - 51.0 ) * 90.0 / 49.0
     49    ENDDO
     50
     51    dvrp_colourtable_entries = 100
    3052
    3153#endif
Note: See TracChangeset for help on using the changeset viewer.