source: palm/trunk/SOURCE/user_data_output_2d.f90 @ 1217

Last change on this file since 1217 was 1037, checked in by raasch, 12 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1 SUBROUTINE user_data_output_2d( av, variable, found, grid, local_pf, two_d )
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! Former revisions:
24! -----------------
25! $Id: user_data_output_2d.f90 1037 2012-10-22 14:10:22Z raasch $
26!
27! 1036 2012-10-22 13:43:42Z raasch
28! code put under GPL (PALM 3.9)
29!
30! 667 2010-12-23 12:06:00Z suehring/gryschka
31! nxl-1, nxr+1, nys-1, nyn+1 replaced by nxlg, nxrg, nysg, nyng
32!
33! 343 2009-06-24 12:59:09Z maronga
34! +dummy argument two_d
35!
36! 211 2008-11-11 04:46:24Z raasch
37! Former file user_interface.f90 split into one file per subroutine
38!
39! Description:
40! ------------
41! Resorts the user-defined output quantity with indices (k,j,i) to a
42! temporary array with indices (i,j,k) and sets the grid on which it is defined.
43! Allowed values for grid are "zu" and "zw".
44!------------------------------------------------------------------------------!
45
46    USE indices
47    USE user
48
49    IMPLICIT NONE
50
51    CHARACTER (LEN=*) ::  grid, variable
52
53    INTEGER ::  av, i, j, k
54
55    LOGICAL ::  found, two_d
56
57    REAL, DIMENSION(nxlg:nxrg,nysg:nyng,nzb:nzt+1) ::  local_pf
58
59
60    found = .TRUE.
61
62    SELECT CASE ( TRIM( variable ) )
63
64!
65!--    Uncomment and extend the following lines, if necessary.
66!--    The arrays for storing the user defined quantities (here u2 and u2_av)
67!--    have to be declared and defined by the user!
68!--    Sample for user-defined output:
69!       CASE ( 'u2_xy', 'u2_xz', 'u2_yz' )
70!          IF ( av == 0 )  THEN
71!             DO  i = nxlg, nxrg
72!                DO  j = nysg, nyng
73!                   DO  k = nzb, nzt+1
74!                      local_pf(i,j,k) = u2(k,j,i)
75!                   ENDDO
76!                ENDDO
77!             ENDDO
78!          ELSE
79!             DO  i = nxlg, nxrg
80!                DO  j = nysg, nyng
81!                   DO  k = nzb, nzt+1
82!                      local_pf(i,j,k) = u2_av(k,j,i)
83!                   ENDDO
84!                ENDDO
85!             ENDDO
86!          ENDIF
87!
88!          grid = 'zu'
89
90
91       CASE DEFAULT
92          found = .FALSE.
93          grid  = 'none'
94
95    END SELECT
96
97
98 END SUBROUTINE user_data_output_2d
99
Note: See TracBrowser for help on using the repository browser.