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