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

Last change on this file since 1682 was 1682, checked in by knoop, 9 years ago

Code annotations made doxygen readable

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