source: palm/trunk/SOURCE/user_data_output_mask.f90 @ 1036

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

code has been put under the GNU General Public License (v3)

  • Property svn:keywords set to Id
File size: 2.7 KB
Line 
1 SUBROUTINE user_data_output_mask( av, variable, found, local_pf )
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_mask.f90 1036 2012-10-22 13:43:42Z raasch $
27! Initial version
28!
29! Description:
30! ------------
31! Resorts the user-defined output quantity with indices (k,j,i) to a
32! temporary array with indices (i,j,k) for masked data output.
33!------------------------------------------------------------------------------!
34
35    USE control_parameters
36    USE indices
37    USE user
38
39    IMPLICIT NONE
40
41    CHARACTER (LEN=*) ::  variable
42
43    INTEGER ::  av, i, j, k
44
45    LOGICAL ::  found
46
47    REAL, DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2), &
48                    mask_size_l(mid,3)) ::  local_pf
49
50
51    found = .TRUE.
52
53    SELECT CASE ( TRIM( variable ) )
54
55!
56!--    Uncomment and extend the following lines, if necessary.
57!--    The arrays for storing the user defined quantities (here u2 and u2_av)
58!--    have to be declared and defined by the user!
59!--    Sample for user-defined output:
60!       CASE ( 'u2' )
61!          IF ( av == 0 )  THEN
62!            DO  i = 1, mask_size_l(mid,1)
63!               DO  j = 1, mask_size_l(mid,2)
64!                  DO  k = 1, mask_size_l(mid,3)
65!                      local_pf(i,j,k) = u2(mask_k(mid,k), &
66!                                           mask_j(mid,j),mask_i(mid,i))
67!                   ENDDO
68!                ENDDO
69!             ENDDO
70!          ELSE
71!            DO  i = 1, mask_size_l(mid,1)
72!               DO  j = 1, mask_size_l(mid,2)
73!                  DO  k = 1, mask_size_l(mid,3)
74!                      local_pf(i,j,k) = u2_av(mask_k(mid,k), &
75!                                              mask_j(mid,j),mask_i(mid,i))
76!                   ENDDO
77!                ENDDO
78!             ENDDO
79!          ENDIF
80!
81
82       CASE DEFAULT
83          found = .FALSE.
84
85    END SELECT
86
87
88 END SUBROUTINE user_data_output_mask
Note: See TracBrowser for help on using the repository browser.