source: palm/trunk/SOURCE/set_slicer_attributes_dvrp.f90 @ 1727

Last change on this file since 1727 was 1683, checked in by knoop, 9 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1!> @file set_slicer_attributes_dvrp.f90
2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2014 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! -----------------
21!
22!
23! Former revisions:
24! -----------------
25! $Id: set_slicer_attributes_dvrp.f90 1683 2015-10-07 23:57:51Z knoop $
26!
27! 1682 2015-10-07 23:56:08Z knoop
28! Code annotations made doxygen readable
29!
30! 1353 2014-04-08 15:21:23Z heinze
31! REAL constants provided with KIND-attribute
32!
33! 1320 2014-03-20 08:40:49Z raasch
34! ONLY-attribute added to USE-statements,
35! kind-parameters added to all INTEGER and REAL declaration statements,
36! kinds are defined in new module kinds,
37! old module precision_kind is removed,
38! revision history before 2012 removed,
39! comment fields (!:) to be used for variable explanations added to
40! all variable declaration statements
41!
42! 1036 2012-10-22 13:43:42Z raasch
43! code put under GPL (PALM 3.9)
44!
45! 305 2009-04-27 11:58:42Z raasch
46! Initial version
47!
48! Description:
49! ------------
50!> This routine sets the dvrp-slicer attributes
51!------------------------------------------------------------------------------!
52 SUBROUTINE set_slicer_attributes_dvrp( n_slicer )
53 
54
55#if defined( __dvrp_graphics )
56
57    USE dvrp_variables,                                                        &
58        ONLY:  dvrp_colortable_entries, interval_h_dvrp, interval_values_dvrp, &
59               slicer_range_limits_dvrp
60
61    USE kinds
62
63    IMPLICIT NONE
64
65    INTEGER(iwp) ::  j         !<
66    INTEGER(iwp) ::  n_slicer  !<
67
68    REAL(wp)     ::  maxv      !<
69    REAL(wp)     ::  meav      !<
70    REAL(wp)     ::  minv      !<
71
72
73!
74!-- Set interval values to user settings.
75!-- The middle of this interval defines the change from blue to yellow
76    minv = slicer_range_limits_dvrp(1,n_slicer)
77    maxv = slicer_range_limits_dvrp(2,n_slicer)
78    meav = ( minv + maxv ) * 0.5_wp
79
80!
81!-- Create appropriate colortable with 100 entries.
82!-- This table ranges from deep blue (min) to deep red (max)
83    DO  j = 1, 50
84       interval_values_dvrp(1,j) = minv + (meav-minv) * ( j - 1.0_wp ) / 50.0_wp
85       interval_values_dvrp(2,j) = minv + (meav-minv) * ( j )          / 50.0_wp
86       interval_h_dvrp(:,j) = 270.0_wp - ( j - 1.0_wp ) * 90.0_wp / 49.0_wp
87    ENDDO
88
89    DO  j = 51, 100
90       interval_values_dvrp(1,j) = meav + (maxv-meav) * ( j - 51.0_wp ) / 50.0_wp
91       interval_values_dvrp(2,j) = meav + (maxv-meav) * ( j - 50.0_wp ) / 50.0_wp
92       interval_h_dvrp(:,j) = 70.0_wp - ( j - 51.0_wp ) * 90.0_wp / 49.0_wp
93    ENDDO
94
95    dvrp_colortable_entries = 100
96
97#endif
98
99 END SUBROUTINE set_slicer_attributes_dvrp
Note: See TracBrowser for help on using the repository browser.