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

Last change on this file since 1848 was 1818, checked in by maronga, 9 years ago

last commit documented / copyright update

  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1!> @file user_data_output_mask.f90
2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
16! Copyright 1997-2016 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! ------------------
21!
22!
23! Former revisions:
24! -----------------
25! $Id: user_data_output_mask.f90 1818 2016-04-06 15:53:27Z witha $
26!
27! 1682 2015-10-07 23:56:08Z knoop
28! Code annotations made doxygen readable
29!
30! 1320 2014-03-20 08:40:49Z raasch
31! kind-parameters added to all INTEGER and REAL declaration statements,
32! kinds are defined in new module kinds,
33! old module precision_kind is removed,
34! comment fields (!:) to be used for variable explanations added to
35! all variable declaration statements
36!
37! 1036 2012-10-22 13:43:42Z raasch
38! code put under GPL (PALM 3.9)
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) for masked data output.
44!------------------------------------------------------------------------------!
45 SUBROUTINE user_data_output_mask( av, variable, found, local_pf )
46 
47
48    USE control_parameters
49       
50    USE indices
51   
52    USE kinds
53   
54    USE user
55
56    IMPLICIT NONE
57
58    CHARACTER (LEN=*) ::  variable   !<
59
60    INTEGER(iwp) ::  av   !<
61    INTEGER(iwp) ::  i    !<
62    INTEGER(iwp) ::  j    !<
63    INTEGER(iwp) ::  k    !<
64
65    LOGICAL ::  found     !<
66
67    REAL(wp),                                                                  &
68       DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  &
69          local_pf   !<
70
71
72    found = .TRUE.
73
74    SELECT CASE ( TRIM( variable ) )
75
76!--    Uncomment and extend the following lines, if necessary.
77!--    The arrays for storing the user defined quantities (here u2 and u2_av)
78!--    have to be declared and defined by the user!
79!--    Sample for user-defined output:
80!       CASE ( 'u2' )
81!          IF ( av == 0 )  THEN
82!            DO  i = 1, mask_size_l(mid,1)
83!               DO  j = 1, mask_size_l(mid,2)
84!                  DO  k = 1, mask_size_l(mid,3)
85!                      local_pf(i,j,k) = u2(mask_k(mid,k),                       &
86!                                           mask_j(mid,j),mask_i(mid,i))
87!                   ENDDO
88!                ENDDO
89!             ENDDO
90!          ELSE
91!            DO  i = 1, mask_size_l(mid,1)
92!               DO  j = 1, mask_size_l(mid,2)
93!                  DO  k = 1, mask_size_l(mid,3)
94!                      local_pf(i,j,k) = u2_av(mask_k(mid,k),                    &
95!                                              mask_j(mid,j),mask_i(mid,i))
96!                   ENDDO
97!                ENDDO
98!             ENDDO
99!          ENDIF
100
101       CASE DEFAULT
102          found = .FALSE.
103
104    END SELECT
105
106
107 END SUBROUTINE user_data_output_mask
Note: See TracBrowser for help on using the repository browser.