[1682] | 1 | !> @file set_slicer_attributes_dvrp.f90 |
---|
[1036] | 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 | ! |
---|
[1310] | 16 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
[1036] | 17 | !--------------------------------------------------------------------------------! |
---|
| 18 | ! |
---|
[484] | 19 | ! Current revisions: |
---|
[278] | 20 | ! ----------------- |
---|
[1354] | 21 | ! |
---|
[1683] | 22 | ! |
---|
[1321] | 23 | ! Former revisions: |
---|
| 24 | ! ----------------- |
---|
| 25 | ! $Id: set_slicer_attributes_dvrp.f90 1683 2015-10-07 23:57:51Z gronemeier $ |
---|
| 26 | ! |
---|
[1683] | 27 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 28 | ! Code annotations made doxygen readable |
---|
| 29 | ! |
---|
[1354] | 30 | ! 1353 2014-04-08 15:21:23Z heinze |
---|
| 31 | ! REAL constants provided with KIND-attribute |
---|
| 32 | ! |
---|
[1321] | 33 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 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 |
---|
[278] | 41 | ! |
---|
[1037] | 42 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 43 | ! code put under GPL (PALM 3.9) |
---|
| 44 | ! |
---|
[392] | 45 | ! 305 2009-04-27 11:58:42Z raasch |
---|
| 46 | ! Initial version |
---|
[278] | 47 | ! |
---|
| 48 | ! Description: |
---|
| 49 | ! ------------ |
---|
[1682] | 50 | !> This routine sets the dvrp-slicer attributes |
---|
[278] | 51 | !------------------------------------------------------------------------------! |
---|
[1682] | 52 | SUBROUTINE set_slicer_attributes_dvrp( n_slicer ) |
---|
| 53 | |
---|
[305] | 54 | |
---|
[278] | 55 | #if defined( __dvrp_graphics ) |
---|
| 56 | |
---|
[1320] | 57 | USE dvrp_variables, & |
---|
| 58 | ONLY: dvrp_colortable_entries, interval_h_dvrp, interval_values_dvrp, & |
---|
| 59 | slicer_range_limits_dvrp |
---|
[278] | 60 | |
---|
[1320] | 61 | USE kinds |
---|
| 62 | |
---|
[278] | 63 | IMPLICIT NONE |
---|
| 64 | |
---|
[1682] | 65 | INTEGER(iwp) :: j !< |
---|
| 66 | INTEGER(iwp) :: n_slicer !< |
---|
[278] | 67 | |
---|
[1682] | 68 | REAL(wp) :: maxv !< |
---|
| 69 | REAL(wp) :: meav !< |
---|
| 70 | REAL(wp) :: minv !< |
---|
[284] | 71 | |
---|
[1320] | 72 | |
---|
[278] | 73 | ! |
---|
[284] | 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) |
---|
[1353] | 78 | meav = ( minv + maxv ) * 0.5_wp |
---|
[278] | 79 | |
---|
[284] | 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 |
---|
[1353] | 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 |
---|
[284] | 87 | ENDDO |
---|
| 88 | |
---|
| 89 | DO j = 51, 100 |
---|
[1353] | 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 |
---|
[284] | 93 | ENDDO |
---|
| 94 | |
---|
[285] | 95 | dvrp_colortable_entries = 100 |
---|
[284] | 96 | |
---|
[278] | 97 | #endif |
---|
[305] | 98 | |
---|
[278] | 99 | END SUBROUTINE set_slicer_attributes_dvrp |
---|