source: palm/trunk/SOURCE/lpm_write_exchange_statistics.f90 @ 1724

Last change on this file since 1724 was 1683, checked in by knoop, 8 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 4.1 KB
Line 
1!> @file lpm_write_exchange_statistics.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-2014 Leibniz Universitaet Hannover
17!--------------------------------------------------------------------------------!
18!
19! Current revisions:
20! ------------------
21!
22!
23! Former revisions:
24! -----------------
25! $Id: lpm_write_exchange_statistics.f90 1683 2015-10-07 23:57:51Z boeske $
26!
27! 1682 2015-10-07 23:56:08Z knoop
28! Code annotations made doxygen readable
29!
30! 1359 2014-04-11 17:15:14Z hoffmann
31! New particle structure integrated.
32!
33! 1320 2014-03-20 08:40:49Z raasch
34! ONLY-attribute added to USE-statements,
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! 849 2012-03-15 10:35:09Z raasch
42! initial revision (former part of advec_particles)
43!
44!
45! Description:
46! ------------
47!> Write particle statistics (total particle numbers and number of particles
48!> exchanged between subdomains) on ASCII file.
49!>
50!> @attention Output format of this file could be further improved! At current
51!>            stage it is only a test output.
52!------------------------------------------------------------------------------!
53 SUBROUTINE lpm_write_exchange_statistics
54 
55
56    USE control_parameters,                                                    &
57        ONLY:  current_timestep_number, dt_3d, simulated_time
58
59    USE indices,                                                               &
60        ONLY:  nxl, nxr, nys, nyn, nzb, nzt
61
62    USE particle_attributes,                                                   &
63        ONLY:  grid_particles, maximum_number_of_particles,                    &
64               number_of_particles, particles, prt_count,                      &
65               trlp_count_sum, trlp_count_recv_sum, trnp_count_sum,            &
66               trnp_count_recv_sum, trrp_count_sum, trrp_count_recv_sum,       &
67               trsp_count_sum, trsp_count_recv_sum
68
69    USE pegrid
70
71    IMPLICIT NONE
72
73    INTEGER(iwp) :: ip         !<
74    INTEGER(iwp) :: jp         !<
75    INTEGER(iwp) :: kp         !<
76
77!
78!-- Determine maximum number of particles (i.e., all possible particles that
79!-- have been allocated) and the current number of particles
80    number_of_particles         = 0
81    maximum_number_of_particles = 0
82    DO  ip = nxl, nxr
83       DO  jp = nys, nyn
84          DO  kp = nzb+1, nzt
85             number_of_particles = number_of_particles                         &
86                                     + prt_count(kp,jp,ip)
87             maximum_number_of_particles = maximum_number_of_particles         &
88                                     + SIZE(grid_particles(kp,jp,ip)%particles)
89          ENDDO
90       ENDDO
91    ENDDO
92
93    CALL check_open( 80 )
94#if defined( __parallel )
95    WRITE ( 80, 8000 )  current_timestep_number+1, simulated_time+dt_3d, &
96                        number_of_particles, pleft, trlp_count_sum,      &
97                        trlp_count_recv_sum, pright, trrp_count_sum,     &
98                        trrp_count_recv_sum, psouth, trsp_count_sum,     &
99                        trsp_count_recv_sum, pnorth, trnp_count_sum,     &
100                        trnp_count_recv_sum, maximum_number_of_particles
101    CALL close_file( 80 )
102#else
103    WRITE ( 80, 8000 )  current_timestep_number+1, simulated_time+dt_3d, &
104                        number_of_particles, maximum_number_of_particles
105#endif
106
107!
108!-- Formats
1098000 FORMAT (I6,1X,F7.2,4X,I10,5X,4(I3,1X,I4,'/',I4,2X),6X,I10)
110
111
112 END SUBROUTINE lpm_write_exchange_statistics
Note: See TracBrowser for help on using the repository browser.