source: palm/trunk/SOURCE/user_data_output_3d.f90 @ 1037

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

last commit documented

  • Property svn:keywords set to Id
File size: 2.6 KB
RevLine 
[211]1 SUBROUTINE user_data_output_3d( av, variable, found, local_pf, nz_do )
2
[1036]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!
[484]20! Current revisions:
[211]21! -----------------
22!
23! Former revisions:
24! -----------------
25! $Id: user_data_output_3d.f90 1037 2012-10-22 14:10:22Z raasch $
26!
[1037]27! 1036 2012-10-22 13:43:42Z raasch
28! code put under GPL (PALM 3.9)
29!
[668]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!
[226]33! 211 2008-11-11 04:46:24Z raasch
34! Former file user_interface.f90 split into one file per subroutine
35!
[211]36! Description:
37! ------------
38! Resorts the user-defined output quantity with indices (k,j,i) to a
39! temporary array with indices (i,j,k).
40!------------------------------------------------------------------------------!
41
42    USE array_kind
43    USE indices
44    USE user
45
46    IMPLICIT NONE
47
48    CHARACTER (LEN=*) ::  variable
49
50    INTEGER ::  av, i, j, k, nz_do
51
52    LOGICAL ::  found
53
[667]54   REAL(spk), DIMENSION(nxlg:nxrg,nysg:nyng,nzb:nz_do) ::  local_pf
[211]55
56
57    found = .TRUE.
58
59    SELECT CASE ( TRIM( variable ) )
60
61!
62!--    Uncomment and extend the following lines, if necessary.
63!--    The arrays for storing the user defined quantities (here u2 and u2_av)
64!--    have to be declared and defined by the user!
65!--    Sample for user-defined output:
66!       CASE ( 'u2' )
67!          IF ( av == 0 )  THEN
[667]68!             DO  i = nxlg, nxrg
69!                DO  j = nysg, nyng
[211]70!                   DO  k = nzb, nz_do
71!                      local_pf(i,j,k) = u2(k,j,i)
72!                   ENDDO
73!                ENDDO
74!             ENDDO
75!          ELSE
[667]76!             DO  i = nxlg, nxrg
77!                DO  j = nysg, nyng
[211]78!                   DO  k = nzb, nz_do
79!                      local_pf(i,j,k) = u2_av(k,j,i)
80!                   ENDDO
81!                ENDDO
82!             ENDDO
83!          ENDIF
84!
85
86       CASE DEFAULT
87          found = .FALSE.
88
89    END SELECT
90
91
92 END SUBROUTINE user_data_output_3d
93
Note: See TracBrowser for help on using the repository browser.