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

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

last commit documented

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