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

Last change on this file since 2000 was 2000, checked in by knoop, 5 years ago

Forced header and separation lines into 80 columns

  • 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
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! 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-2016 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! ------------------
22! Forced header and separation lines into 80 columns
23!
24! Former revisions:
25! -----------------
26! $Id: user_data_output_mask.f90 2000 2016-08-20 18:09:15Z knoop $
27!
28! 1682 2015-10-07 23:56:08Z knoop
29! Code annotations made doxygen readable
30!
31! 1320 2014-03-20 08:40:49Z raasch
32! kind-parameters added to all INTEGER and REAL declaration statements,
33! kinds are defined in new module kinds,
34! old module precision_kind is removed,
35! comment fields (!:) to be used for variable explanations added to
36! all variable declaration statements
37!
38! 1036 2012-10-22 13:43:42Z raasch
39! code put under GPL (PALM 3.9)
40!
41! Description:
42! ------------
43!> Resorts the user-defined output quantity with indices (k,j,i) to a
44!> temporary array with indices (i,j,k) for masked data output.
45!------------------------------------------------------------------------------!
46 SUBROUTINE user_data_output_mask( av, variable, found, local_pf )
47 
48
49    USE control_parameters
50       
51    USE indices
52   
53    USE kinds
54   
55    USE user
56
57    IMPLICIT NONE
58
59    CHARACTER (LEN=*) ::  variable   !<
60
61    INTEGER(iwp) ::  av   !<
62    INTEGER(iwp) ::  i    !<
63    INTEGER(iwp) ::  j    !<
64    INTEGER(iwp) ::  k    !<
65
66    LOGICAL ::  found     !<
67
68    REAL(wp),                                                                  &
69       DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  &
70          local_pf   !<
71
72
73    found = .TRUE.
74
75    SELECT CASE ( TRIM( variable ) )
76
77!--    Uncomment and extend the following lines, if necessary.
78!--    The arrays for storing the user defined quantities (here u2 and u2_av)
79!--    have to be declared and defined by the user!
80!--    Sample for user-defined output:
81!       CASE ( 'u2' )
82!          IF ( av == 0 )  THEN
83!            DO  i = 1, mask_size_l(mid,1)
84!               DO  j = 1, mask_size_l(mid,2)
85!                  DO  k = 1, mask_size_l(mid,3)
86!                      local_pf(i,j,k) = u2(mask_k(mid,k),                       &
87!                                           mask_j(mid,j),mask_i(mid,i))
88!                   ENDDO
89!                ENDDO
90!             ENDDO
91!          ELSE
92!            DO  i = 1, mask_size_l(mid,1)
93!               DO  j = 1, mask_size_l(mid,2)
94!                  DO  k = 1, mask_size_l(mid,3)
95!                      local_pf(i,j,k) = u2_av(mask_k(mid,k),                    &
96!                                              mask_j(mid,j),mask_i(mid,i))
97!                   ENDDO
98!                ENDDO
99!             ENDDO
100!          ENDIF
101
102       CASE DEFAULT
103          found = .FALSE.
104
105    END SELECT
106
107
108 END SUBROUTINE user_data_output_mask
Note: See TracBrowser for help on using the repository browser.