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

Last change on this file since 1920 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
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!
[1818]16! Copyright 1997-2016 Leibniz Universitaet Hannover
[1036]17!--------------------------------------------------------------------------------!
18!
[300]19! Current revisions:
20! ------------------
[1683]21!
22!
[1321]23! Former revisions:
24! -----------------
25! $Id: user_data_output_mask.f90 1818 2016-04-06 15:53:27Z suehring $
26!
[1683]27! 1682 2015-10-07 23:56:08Z knoop
28! Code annotations made doxygen readable
29!
[1321]30! 1320 2014-03-20 08:40:49Z raasch
[1320]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
[300]36!
[1037]37! 1036 2012-10-22 13:43:42Z raasch
38! code put under GPL (PALM 3.9)
39!
[300]40! Description:
41! ------------
[1682]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.
[300]44!------------------------------------------------------------------------------!
[1682]45 SUBROUTINE user_data_output_mask( av, variable, found, local_pf )
46 
[300]47
48    USE control_parameters
[1320]49       
[300]50    USE indices
[1320]51   
52    USE kinds
53   
[300]54    USE user
55
56    IMPLICIT NONE
57
[1682]58    CHARACTER (LEN=*) ::  variable   !<
[300]59
[1682]60    INTEGER(iwp) ::  av   !<
61    INTEGER(iwp) ::  i    !<
62    INTEGER(iwp) ::  j    !<
63    INTEGER(iwp) ::  k    !<
[300]64
[1682]65    LOGICAL ::  found     !<
[300]66
[1320]67    REAL(wp),                                                                  &
68       DIMENSION(mask_size_l(mid,1),mask_size_l(mid,2),mask_size_l(mid,3)) ::  &
[1682]69          local_pf   !<
[300]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)
[1320]85!                      local_pf(i,j,k) = u2(mask_k(mid,k),                       &
[300]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)
[1320]94!                      local_pf(i,j,k) = u2_av(mask_k(mid,k),                    &
[300]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.