1 | !> @file data_output_dvrp_mod.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-2016 Leibniz Universitaet Hannover |
---|
17 | !--------------------------------------------------------------------------------! |
---|
18 | ! |
---|
19 | ! Current revisions: |
---|
20 | ! ----------------- |
---|
21 | ! Module renamed |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: data_output_dvrp_mod.f90 1850 2016-04-08 13:29:27Z maronga $ |
---|
27 | ! |
---|
28 | ! 1822 2016-04-07 07:49:42Z hoffmann |
---|
29 | ! Particles and tails removed. |
---|
30 | ! |
---|
31 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
32 | ! Code annotations made doxygen readable |
---|
33 | ! |
---|
34 | ! 1353 2014-04-08 15:21:23Z heinze |
---|
35 | ! REAL constants provided with KIND-attribute |
---|
36 | ! |
---|
37 | ! 1346 2014-03-27 13:18:20Z heinze |
---|
38 | ! Bugfix: REAL constants provided with KIND-attribute especially in call of |
---|
39 | ! intrinsic function like MAX, MIN, SIGN |
---|
40 | ! |
---|
41 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
42 | ! ONLY-attribute added to USE-statements, |
---|
43 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
44 | ! kinds are defined in new module kinds, |
---|
45 | ! revision history before 2012 removed, |
---|
46 | ! comment fields (!:) to be used for variable explanations added to |
---|
47 | ! all variable declaration statements |
---|
48 | ! |
---|
49 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
50 | ! module interfaces removed |
---|
51 | ! |
---|
52 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
53 | ! code put under GPL (PALM 3.9) |
---|
54 | ! |
---|
55 | ! 828 2012-02-21 12:00:36Z raasch |
---|
56 | ! particle feature color renamed class |
---|
57 | ! |
---|
58 | ! Revision 1.1 2000/04/27 06:27:17 raasch |
---|
59 | ! Initial revision |
---|
60 | ! |
---|
61 | ! |
---|
62 | ! Description: |
---|
63 | ! ------------ |
---|
64 | !> Plot of isosurface and slicers with dvrp-software |
---|
65 | !------------------------------------------------------------------------------! |
---|
66 | MODULE dvrp_color |
---|
67 | |
---|
68 | |
---|
69 | USE dvrp_variables |
---|
70 | |
---|
71 | USE kinds |
---|
72 | |
---|
73 | IMPLICIT NONE |
---|
74 | |
---|
75 | CONTAINS |
---|
76 | |
---|
77 | !------------------------------------------------------------------------------! |
---|
78 | ! Description: |
---|
79 | ! ------------ |
---|
80 | !> @todo Missing subroutine description. |
---|
81 | !------------------------------------------------------------------------------! |
---|
82 | SUBROUTINE color_dvrp( value, color ) |
---|
83 | |
---|
84 | REAL(wp), INTENT(IN) :: value !< |
---|
85 | REAL(wp), INTENT(OUT) :: color(4) !< |
---|
86 | |
---|
87 | REAL(wp) :: scale !< |
---|
88 | |
---|
89 | scale = ( value - slicer_range_limits_dvrp(1,islice_dvrp) ) / & |
---|
90 | ( slicer_range_limits_dvrp(2,islice_dvrp) - & |
---|
91 | slicer_range_limits_dvrp(1,islice_dvrp) ) |
---|
92 | |
---|
93 | scale = MODULO( 180.0_wp + 180.0_wp * scale, 360.0_wp ) |
---|
94 | |
---|
95 | color = (/ scale, 0.5_wp, 1.0_wp, 0.0_wp /) |
---|
96 | |
---|
97 | END SUBROUTINE color_dvrp |
---|
98 | |
---|
99 | END MODULE dvrp_color |
---|
100 | |
---|
101 | |
---|
102 | RECURSIVE SUBROUTINE data_output_dvrp |
---|
103 | |
---|
104 | #if defined( __dvrp_graphics ) |
---|
105 | |
---|
106 | USE arrays_3d, & |
---|
107 | ONLY: p, pt, q, ql, ts, u, us, v, w, zu |
---|
108 | |
---|
109 | USE cloud_parameters, & |
---|
110 | ONLY: l_d_cp, pt_d_t |
---|
111 | |
---|
112 | USE constants, & |
---|
113 | ONLY: pi |
---|
114 | |
---|
115 | USE control_parameters, & |
---|
116 | ONLY: cloud_droplets, cloud_physics, do2d, do3d, humidity, ibc_uv_b, & |
---|
117 | message_string, nz_do3d, passive_scalar, simulated_time, & |
---|
118 | threshold |
---|
119 | |
---|
120 | USE cpulog, & |
---|
121 | ONLY: log_point, log_point_s, cpu_log |
---|
122 | |
---|
123 | USE DVRP |
---|
124 | |
---|
125 | USE dvrp_color |
---|
126 | |
---|
127 | USE dvrp_variables |
---|
128 | |
---|
129 | USE grid_variables, & |
---|
130 | ONLY: dx, dy |
---|
131 | |
---|
132 | USE indices, & |
---|
133 | ONLY: nxl, nxr, nyn, nys, nzb |
---|
134 | |
---|
135 | USE kinds |
---|
136 | |
---|
137 | USE pegrid |
---|
138 | |
---|
139 | IMPLICIT NONE |
---|
140 | |
---|
141 | CHARACTER (LEN=2) :: section_chr !< |
---|
142 | CHARACTER (LEN=6) :: output_variable !< |
---|
143 | |
---|
144 | INTEGER(iwp) :: c_mode !< |
---|
145 | INTEGER(iwp) :: c_size_x !< |
---|
146 | INTEGER(iwp) :: c_size_y !< |
---|
147 | INTEGER(iwp) :: c_size_z !< |
---|
148 | INTEGER(iwp) :: dvrp_nop !< |
---|
149 | INTEGER(iwp) :: dvrp_not !< |
---|
150 | INTEGER(iwp) :: gradient_normals !< |
---|
151 | INTEGER(iwp) :: i !< |
---|
152 | INTEGER(iwp) :: ip !< |
---|
153 | INTEGER(iwp) :: j !< |
---|
154 | INTEGER(iwp) :: jp !< |
---|
155 | INTEGER(iwp) :: k !< |
---|
156 | INTEGER(iwp) :: l !< |
---|
157 | INTEGER(iwp) :: m !< |
---|
158 | INTEGER(iwp) :: n !< |
---|
159 | INTEGER(iwp) :: n_isosurface !< |
---|
160 | INTEGER(iwp) :: n_slicer !< |
---|
161 | INTEGER(iwp) :: nn !< |
---|
162 | INTEGER(iwp) :: section_mode !< |
---|
163 | INTEGER(iwp) :: vn !< |
---|
164 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: p_c !< |
---|
165 | INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: p_t !< |
---|
166 | |
---|
167 | LOGICAL, DIMENSION(:), ALLOCATABLE :: dvrp_mask !< |
---|
168 | |
---|
169 | REAL(sp) :: slicer_position !< |
---|
170 | REAL(sp) :: tmp_alpha !< |
---|
171 | REAL(sp) :: tmp_alpha_w !< |
---|
172 | REAL(sp) :: tmp_b !< |
---|
173 | REAL(sp) :: tmp_c_alpha !< |
---|
174 | REAL(sp) :: tmp_g !< |
---|
175 | REAL(sp) :: tmp_norm !< |
---|
176 | REAL(sp) :: tmp_pos !< |
---|
177 | REAL(sp) :: tmp_r !< |
---|
178 | REAL(sp) :: tmp_t !< |
---|
179 | REAL(sp) :: tmp_th !< |
---|
180 | REAL(sp), DIMENSION(:), ALLOCATABLE :: psize !< |
---|
181 | REAL(sp), DIMENSION(:), ALLOCATABLE :: p_x !< |
---|
182 | REAL(sp), DIMENSION(:), ALLOCATABLE :: p_y !< |
---|
183 | REAL(sp), DIMENSION(:), ALLOCATABLE :: p_z !< |
---|
184 | REAL(sp), DIMENSION(:,:,:), ALLOCATABLE :: local_pf !< |
---|
185 | REAL(sp), DIMENSION(:,:,:,:), ALLOCATABLE :: local_pfi !< |
---|
186 | |
---|
187 | |
---|
188 | CALL cpu_log( log_point(27), 'data_output_dvrp', 'start' ) |
---|
189 | |
---|
190 | ! |
---|
191 | !-- Loop over all output modes choosed |
---|
192 | m = 1 |
---|
193 | n_isosurface = 0 ! isosurface counter (for threshold values and color) |
---|
194 | n_slicer = 0 ! slice plane counter (for range of values) |
---|
195 | DO WHILE ( mode_dvrp(m) /= ' ' ) |
---|
196 | ! |
---|
197 | !-- Update of the steering variables |
---|
198 | IF ( .NOT. lock_steering_update ) THEN |
---|
199 | ! |
---|
200 | !-- Set lock to avoid recursive calls of DVRP_STEERING_UPDATE |
---|
201 | lock_steering_update = .TRUE. |
---|
202 | ! CALL DVRP_STEERING_UPDATE( m-1, data_output_dvrp ) |
---|
203 | lock_steering_update = .FALSE. |
---|
204 | ENDIF |
---|
205 | |
---|
206 | ! |
---|
207 | !-- Determine the variable which shall be plotted (in case of slicers or |
---|
208 | !-- isosurfaces) |
---|
209 | IF ( mode_dvrp(m)(1:10) == 'isosurface' ) THEN |
---|
210 | READ ( mode_dvrp(m), '(10X,I2)' ) vn |
---|
211 | output_variable = do3d(0,vn) |
---|
212 | n_isosurface = n_isosurface + 1 |
---|
213 | ELSEIF ( mode_dvrp(m)(1:6) == 'slicer' ) THEN |
---|
214 | READ ( mode_dvrp(m), '(6X,I2)' ) vn |
---|
215 | output_variable = do2d(0,vn) |
---|
216 | l = MAX( 2, LEN_TRIM( do2d(0,vn) ) ) |
---|
217 | section_chr = do2d(0,vn)(l-1:l) |
---|
218 | SELECT CASE ( section_chr ) |
---|
219 | CASE ( 'xy' ) |
---|
220 | section_mode = 2 |
---|
221 | slicer_position = zu(MIN( slicer_position_dvrp(m), nz_do3d )) |
---|
222 | CASE ( 'xz' ) |
---|
223 | section_mode = 1 |
---|
224 | slicer_position = slicer_position_dvrp(m) * dy |
---|
225 | CASE ( 'yz' ) |
---|
226 | section_mode = 0 |
---|
227 | slicer_position = slicer_position_dvrp(m) * dx |
---|
228 | END SELECT |
---|
229 | ENDIF |
---|
230 | |
---|
231 | ! |
---|
232 | !-- Select the plot mode (in case of isosurface or slicer only if user has |
---|
233 | !-- defined a variable which shall be plotted; otherwise do nothing) |
---|
234 | IF ( ( mode_dvrp(m)(1:10) == 'isosurface' .OR. & |
---|
235 | mode_dvrp(m)(1:6) == 'slicer' ) & |
---|
236 | .AND. output_variable /= ' ' ) THEN |
---|
237 | |
---|
238 | ! |
---|
239 | !-- Create an intermediate array, properly dimensioned for plot-output |
---|
240 | ALLOCATE( local_pf(nxl_dvrp:nxr_dvrp+1,nys_dvrp:nyn_dvrp+1, & |
---|
241 | nzb:nz_do3d) ) |
---|
242 | |
---|
243 | ! |
---|
244 | !-- Move original array to intermediate array |
---|
245 | IF ( dvrp_overlap ) THEN |
---|
246 | |
---|
247 | SELECT CASE ( output_variable ) |
---|
248 | |
---|
249 | CASE ( 'u', 'u_xy', 'u_xz', 'u_yz' ) |
---|
250 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
251 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
252 | DO k = nzb, nz_do3d |
---|
253 | local_pf(i,j,k) = u(k,j,i) |
---|
254 | ENDDO |
---|
255 | ENDDO |
---|
256 | ENDDO |
---|
257 | ! |
---|
258 | !-- Replace mirrored values at lower surface by real surface |
---|
259 | !-- values |
---|
260 | IF ( output_variable == 'u_xz' .OR. & |
---|
261 | output_variable == 'u_yz' ) THEN |
---|
262 | IF ( ibc_uv_b == 0 ) local_pf(:,:,nzb) = 0.0_wp |
---|
263 | ENDIF |
---|
264 | |
---|
265 | |
---|
266 | CASE ( 'v', 'v_xy', 'v_xz', 'v_yz' ) |
---|
267 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
268 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
269 | DO k = nzb, nz_do3d |
---|
270 | local_pf(i,j,k) = v(k,j,i) |
---|
271 | ENDDO |
---|
272 | ENDDO |
---|
273 | ENDDO |
---|
274 | ! |
---|
275 | !-- Replace mirrored values at lower surface by real surface |
---|
276 | !-- values |
---|
277 | IF ( output_variable == 'v_xz' .OR. & |
---|
278 | output_variable == 'v_yz' ) THEN |
---|
279 | IF ( ibc_uv_b == 0 ) local_pf(:,:,nzb) = 0.0_wp |
---|
280 | ENDIF |
---|
281 | |
---|
282 | CASE ( 'w', 'w_xy', 'w_xz', 'w_yz' ) |
---|
283 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
284 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
285 | DO k = nzb, nz_do3d |
---|
286 | local_pf(i,j,k) = w(k,j,i) |
---|
287 | ENDDO |
---|
288 | ENDDO |
---|
289 | ENDDO |
---|
290 | ! Averaging for Langmuir circulation |
---|
291 | ! DO k = nzb, nz_do3d |
---|
292 | ! DO j = nys_dvrp+1, nyn_dvrp |
---|
293 | ! DO i = nxl_dvrp, nxr_dvrp+1 |
---|
294 | ! local_pf(i,j,k) = 0.25 * local_pf(i,j-1,k) + & |
---|
295 | ! 0.50 * local_pf(i,j,k) + & |
---|
296 | ! 0.25 * local_pf(i,j+1,k) |
---|
297 | ! ENDDO |
---|
298 | ! ENDDO |
---|
299 | ! ENDDO |
---|
300 | |
---|
301 | CASE ( 'p', 'p_xy', 'p_xz', 'p_yz' ) |
---|
302 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
303 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
304 | DO k = nzb, nz_do3d |
---|
305 | local_pf(i,j,k) = p(k,j,i) |
---|
306 | ENDDO |
---|
307 | ENDDO |
---|
308 | ENDDO |
---|
309 | |
---|
310 | CASE ( 'pt', 'pt_xy', 'pt_xz', 'pt_yz' ) |
---|
311 | IF ( .NOT. cloud_physics ) THEN |
---|
312 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
313 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
314 | DO k = nzb, nz_do3d |
---|
315 | local_pf(i,j,k) = pt(k,j,i) |
---|
316 | ENDDO |
---|
317 | ENDDO |
---|
318 | ENDDO |
---|
319 | ELSE |
---|
320 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
321 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
322 | DO k = nzb, nz_do3d |
---|
323 | local_pf(i,j,k) = pt(k,j,i) + l_d_cp * & |
---|
324 | pt_d_t(k) * ql(k,j,i) |
---|
325 | ENDDO |
---|
326 | ENDDO |
---|
327 | ENDDO |
---|
328 | ENDIF |
---|
329 | |
---|
330 | CASE ( 'q', 'q_xy', 'q_xz', 'q_yz' ) |
---|
331 | IF ( humidity .OR. passive_scalar ) THEN |
---|
332 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
333 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
334 | DO k = nzb, nz_do3d |
---|
335 | local_pf(i,j,k) = q(k,j,i) |
---|
336 | ENDDO |
---|
337 | ENDDO |
---|
338 | ENDDO |
---|
339 | ELSE |
---|
340 | message_string = 'if humidity/passive_scalar = ' // & |
---|
341 | 'FALSE output of ' // TRIM( output_variable ) // & |
---|
342 | 'is not provided' |
---|
343 | CALL message( 'data_output_dvrp', 'PA0183',& |
---|
344 | 0, 0, 0, 6, 0 ) |
---|
345 | ENDIF |
---|
346 | |
---|
347 | CASE ( 'ql', 'ql_xy', 'ql_xz', 'ql_yz' ) |
---|
348 | IF ( cloud_physics .OR. cloud_droplets ) THEN |
---|
349 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
350 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
351 | DO k = nzb, nz_do3d |
---|
352 | local_pf(i,j,k) = ql(k,j,i) |
---|
353 | ENDDO |
---|
354 | ENDDO |
---|
355 | ENDDO |
---|
356 | ELSE |
---|
357 | message_string = 'if cloud_physics = FALSE ' // & |
---|
358 | 'output of ' // TRIM( output_variable) // & |
---|
359 | 'is not provided' |
---|
360 | CALL message( 'data_output_dvrp', 'PA0184',& |
---|
361 | 0, 0, 0, 6, 0 ) |
---|
362 | ENDIF |
---|
363 | |
---|
364 | CASE ( 'u*_xy' ) |
---|
365 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
366 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
367 | local_pf(i,j,nzb+1) = us(j,i) |
---|
368 | ENDDO |
---|
369 | ENDDO |
---|
370 | slicer_position = zu(nzb+1) |
---|
371 | |
---|
372 | CASE ( 't*_xy' ) |
---|
373 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
374 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
375 | local_pf(i,j,nzb+1) = ts(j,i) |
---|
376 | ENDDO |
---|
377 | ENDDO |
---|
378 | slicer_position = zu(nzb+1) |
---|
379 | |
---|
380 | |
---|
381 | CASE DEFAULT |
---|
382 | ! |
---|
383 | !-- The DEFAULT case is reached either if output_variable |
---|
384 | !-- contains unsupported variable or if the user has coded a |
---|
385 | !-- special case in the user interface. There, the subroutine |
---|
386 | !-- user_data_output_dvrp checks which of these two conditions |
---|
387 | !-- applies. |
---|
388 | CALL user_data_output_dvrp( output_variable, local_pf ) |
---|
389 | |
---|
390 | |
---|
391 | END SELECT |
---|
392 | |
---|
393 | ELSE |
---|
394 | ! |
---|
395 | !-- No overlap of clipping domain with the current subdomain |
---|
396 | DO i = nxl_dvrp, nxr_dvrp+1 |
---|
397 | DO j = nys_dvrp, nyn_dvrp+1 |
---|
398 | DO k = nzb, nz_do3d |
---|
399 | local_pf(i,j,k) = 0.0_wp |
---|
400 | ENDDO |
---|
401 | ENDDO |
---|
402 | ENDDO |
---|
403 | |
---|
404 | ENDIF |
---|
405 | |
---|
406 | IF ( mode_dvrp(m)(1:10) == 'isosurface' ) THEN |
---|
407 | |
---|
408 | ! |
---|
409 | !-- DVRP-Calls for plotting isosurfaces: |
---|
410 | CALL cpu_log( log_point_s(26), 'dvrp_isosurface', 'start' ) |
---|
411 | |
---|
412 | ! |
---|
413 | !-- Definition of isosurface color |
---|
414 | tmp_r = isosurface_color(1,n_isosurface) |
---|
415 | tmp_g = isosurface_color(2,n_isosurface) |
---|
416 | tmp_b = isosurface_color(3,n_isosurface) |
---|
417 | tmp_t = 0.0_wp |
---|
418 | CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t ) |
---|
419 | |
---|
420 | ! |
---|
421 | !-- Compute and plot isosurface in dvr-format |
---|
422 | CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, & |
---|
423 | cyclic_dvrp, cyclic_dvrp, cyclic_dvrp ) |
---|
424 | |
---|
425 | c_size_x = vc_size_x; c_size_y = vc_size_y; c_size_z = vc_size_z |
---|
426 | CALL DVRP_CLUSTER_SIZE( m-1, c_size_x, c_size_y, c_size_z ) |
---|
427 | |
---|
428 | c_mode = vc_mode |
---|
429 | CALL DVRP_CLUSTERING_MODE( m-1, c_mode ) |
---|
430 | |
---|
431 | gradient_normals = vc_gradient_normals |
---|
432 | CALL DVRP_GRADIENTNORMALS( m-1, gradient_normals ) |
---|
433 | |
---|
434 | ! |
---|
435 | !-- A seperate procedure for setting vc_alpha will be in the next |
---|
436 | !-- version of libDVRP |
---|
437 | tmp_c_alpha = vc_alpha |
---|
438 | CALL DVRP_THRESHOLD( -(m-1)-1, tmp_c_alpha ) |
---|
439 | |
---|
440 | IF ( dvrp_overlap ) THEN |
---|
441 | tmp_th = threshold(n_isosurface) |
---|
442 | ELSE |
---|
443 | tmp_th = 1.0_wp ! nothing is plotted because array values are 0 |
---|
444 | ENDIF |
---|
445 | |
---|
446 | CALL DVRP_THRESHOLD( m-1, tmp_th ) |
---|
447 | |
---|
448 | CALL DVRP_VISUALIZE( m-1, 21, dvrp_filecount ) |
---|
449 | |
---|
450 | CALL cpu_log( log_point_s(26), 'dvrp_isosurface', 'stop' ) |
---|
451 | |
---|
452 | ELSEIF ( mode_dvrp(m)(1:6) == 'slicer' ) THEN |
---|
453 | |
---|
454 | ! |
---|
455 | !-- DVRP-Calls for plotting slicers: |
---|
456 | CALL cpu_log( log_point_s(27), 'dvrp_slicer', 'start' ) |
---|
457 | |
---|
458 | ! |
---|
459 | !-- Material and color definitions |
---|
460 | tmp_r = 0.0_wp; tmp_g = 0.0_wp; tmp_b = 0.0_wp; tmp_t = 0.0_wp |
---|
461 | CALL DVRP_MATERIAL_RGB( m-1, 1, tmp_r, tmp_g, tmp_b, tmp_t ) |
---|
462 | |
---|
463 | n_slicer = n_slicer + 1 |
---|
464 | |
---|
465 | ! |
---|
466 | !-- Using dolorfunction has not been properly tested |
---|
467 | ! islice_dvrp = n_slicer |
---|
468 | ! CALL DVRP_COLORFUNCTION( m-1, DVRP_CM_HLS, 25, & |
---|
469 | ! slicer_range_limits_dvrp(:,n_slicer), & |
---|
470 | ! color_dvrp ) |
---|
471 | |
---|
472 | ! |
---|
473 | !-- Set interval of values defining the colortable |
---|
474 | CALL set_slicer_attributes_dvrp( n_slicer ) |
---|
475 | |
---|
476 | ! |
---|
477 | !-- Create user-defined colortable |
---|
478 | CALL user_dvrp_coltab( 'slicer', output_variable ) |
---|
479 | |
---|
480 | CALL DVRP_COLORTABLE_HLS( m-1, 1, interval_values_dvrp, & |
---|
481 | interval_h_dvrp, interval_l_dvrp, & |
---|
482 | interval_s_dvrp, interval_a_dvrp ) |
---|
483 | |
---|
484 | ! |
---|
485 | !-- Compute and plot slicer in dvr-format |
---|
486 | CALL DVRP_DATA( m-1, local_pf, 1, nx_dvrp, ny_dvrp, nz_dvrp, & |
---|
487 | cyclic_dvrp, cyclic_dvrp, cyclic_dvrp ) |
---|
488 | tmp_pos = slicer_position |
---|
489 | CALL DVRP_SLICER( m-1, section_mode, tmp_pos ) |
---|
490 | |
---|
491 | CALL DVRP_VISUALIZE( m-1, 2, dvrp_filecount ) |
---|
492 | |
---|
493 | CALL cpu_log( log_point_s(27), 'dvrp_slicer', 'stop' ) |
---|
494 | |
---|
495 | ENDIF |
---|
496 | |
---|
497 | DEALLOCATE( local_pf ) |
---|
498 | |
---|
499 | ELSEIF ( mode_dvrp(m)(1:9) == 'pathlines' ) THEN |
---|
500 | |
---|
501 | ALLOCATE( local_pfi(4,nxl:nxr+1,nys:nyn+1,nzb:nz_do3d) ) |
---|
502 | DO i = nxl, nxr+1 |
---|
503 | DO j = nys, nyn+1 |
---|
504 | DO k = nzb, nz_do3d |
---|
505 | local_pfi(1,i,j,k) = u(k,j,i) |
---|
506 | local_pfi(2,i,j,k) = v(k,j,i) |
---|
507 | local_pfi(3,i,j,k) = w(k,j,i) |
---|
508 | tmp_norm = SQRT( u(k,j,i) * u(k,j,i) + & |
---|
509 | v(k,j,i) * v(k,j,i) + & |
---|
510 | w(k,j,i) * w(k,j,i) ) |
---|
511 | tmp_alpha = ACOS( 0.0_wp * u(k,j,i) / tmp_norm + & |
---|
512 | 0.0_wp * v(k,j,i) / tmp_norm - & |
---|
513 | 1.0_wp * w(k,j,i) / tmp_norm ) |
---|
514 | tmp_alpha_w = tmp_alpha / pi * 180.0_wp |
---|
515 | local_pfi(4,i,j,k) = tmp_alpha_w |
---|
516 | ENDDO |
---|
517 | ENDDO |
---|
518 | ENDDO |
---|
519 | |
---|
520 | CALL cpu_log( log_point_s(31), 'dvrp_pathlines', 'start' ) |
---|
521 | |
---|
522 | CALL DVRP_DATA( m-1, local_pfi, 4, nx_dvrp, ny_dvrp, nz_dvrp, & |
---|
523 | cyclic_dvrp, cyclic_dvrp, cyclic_dvrp ) |
---|
524 | CALL DVRP_VISUALIZE( m-1, 20, dvrp_filecount ) |
---|
525 | |
---|
526 | CALL cpu_log( log_point_s(31), 'dvrp_pathlines', 'stop' ) |
---|
527 | |
---|
528 | DEALLOCATE( local_pfi ) |
---|
529 | |
---|
530 | ENDIF |
---|
531 | |
---|
532 | m = m + 1 |
---|
533 | |
---|
534 | ENDDO |
---|
535 | |
---|
536 | dvrp_filecount = dvrp_filecount + 1 |
---|
537 | |
---|
538 | CALL cpu_log( log_point(27), 'data_output_dvrp', 'stop' ) |
---|
539 | |
---|
540 | #endif |
---|
541 | END SUBROUTINE data_output_dvrp |
---|