1 | SUBROUTINE user_data_output_3d( av, variable, found, local_pf, nz_do ) |
---|
2 | |
---|
3 | !--------------------------------------------------------------------------------! |
---|
4 | ! This file is part of PALM. |
---|
5 | ! |
---|
6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
8 | ! either version 3 of the License, or (at your option) any later 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-2012 Leibniz University Hannover |
---|
18 | !--------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ------------------ |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: user_data_output_3d.f90 1107 2013-03-04 06:23:14Z suehring $ |
---|
27 | ! |
---|
28 | ! 1106 2013-03-04 05:31:38Z raasch |
---|
29 | ! array_kind renamed precision_kind |
---|
30 | ! |
---|
31 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
32 | ! code put under GPL (PALM 3.9) |
---|
33 | ! |
---|
34 | ! 667 2010-12-23 12:06:00Z suehring/gryschka |
---|
35 | ! nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng |
---|
36 | ! |
---|
37 | ! 211 2008-11-11 04:46:24Z raasch |
---|
38 | ! Former file user_interface.f90 split into one file per subroutine |
---|
39 | ! |
---|
40 | ! Description: |
---|
41 | ! ------------ |
---|
42 | ! Resorts the user-defined output quantity with indices (k,j,i) to a |
---|
43 | ! temporary array with indices (i,j,k). |
---|
44 | !------------------------------------------------------------------------------! |
---|
45 | |
---|
46 | USE indices |
---|
47 | USE precision_kind |
---|
48 | USE user |
---|
49 | |
---|
50 | IMPLICIT NONE |
---|
51 | |
---|
52 | CHARACTER (LEN=*) :: variable |
---|
53 | |
---|
54 | INTEGER :: av, i, j, k, nz_do |
---|
55 | |
---|
56 | LOGICAL :: found |
---|
57 | |
---|
58 | REAL(spk), DIMENSION(nxlg:nxrg,nysg:nyng,nzb:nz_do) :: local_pf |
---|
59 | |
---|
60 | |
---|
61 | found = .TRUE. |
---|
62 | |
---|
63 | SELECT CASE ( TRIM( variable ) ) |
---|
64 | |
---|
65 | ! |
---|
66 | !-- Uncomment and extend the following lines, if necessary. |
---|
67 | !-- The arrays for storing the user defined quantities (here u2 and u2_av) |
---|
68 | !-- have to be declared and defined by the user! |
---|
69 | !-- Sample for user-defined output: |
---|
70 | ! CASE ( 'u2' ) |
---|
71 | ! IF ( av == 0 ) THEN |
---|
72 | ! DO i = nxlg, nxrg |
---|
73 | ! DO j = nysg, nyng |
---|
74 | ! DO k = nzb, nz_do |
---|
75 | ! local_pf(i,j,k) = u2(k,j,i) |
---|
76 | ! ENDDO |
---|
77 | ! ENDDO |
---|
78 | ! ENDDO |
---|
79 | ! ELSE |
---|
80 | ! DO i = nxlg, nxrg |
---|
81 | ! DO j = nysg, nyng |
---|
82 | ! DO k = nzb, nz_do |
---|
83 | ! local_pf(i,j,k) = u2_av(k,j,i) |
---|
84 | ! ENDDO |
---|
85 | ! ENDDO |
---|
86 | ! ENDDO |
---|
87 | ! ENDIF |
---|
88 | ! |
---|
89 | |
---|
90 | CASE DEFAULT |
---|
91 | found = .FALSE. |
---|
92 | |
---|
93 | END SELECT |
---|
94 | |
---|
95 | |
---|
96 | END SUBROUTINE user_data_output_3d |
---|
97 | |
---|