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

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

last commit documented

  • Property svn:keywords set to Id
File size: 4.1 KB
RevLine 
[1682]1!> @file lpm_write_exchange_statistics.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!
[849]19! Current revisions:
20! ------------------
[1360]21!
[1683]22!
[849]23! Former revisions:
24! -----------------
25! $Id: lpm_write_exchange_statistics.f90 1683 2015-10-07 23:57:51Z knoop $
26!
[1683]27! 1682 2015-10-07 23:56:08Z knoop
28! Code annotations made doxygen readable
29!
[1360]30! 1359 2014-04-11 17:15:14Z hoffmann
31! New particle structure integrated.
32!
[1321]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!
[1037]38! 1036 2012-10-22 13:43:42Z raasch
39! code put under GPL (PALM 3.9)
40!
[850]41! 849 2012-03-15 10:35:09Z raasch
42! initial revision (former part of advec_particles)
[849]43!
[850]44!
[849]45! Description:
46! ------------
[1682]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.
[849]52!------------------------------------------------------------------------------!
[1682]53 SUBROUTINE lpm_write_exchange_statistics
54 
[849]55
[1359]56    USE control_parameters,                                                    &
[1320]57        ONLY:  current_timestep_number, dt_3d, simulated_time
58
[1359]59    USE indices,                                                               &
60        ONLY:  nxl, nxr, nys, nyn, nzb, nzt
[1320]61
[1359]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
[849]69    USE pegrid
70
71    IMPLICIT NONE
72
[1682]73    INTEGER(iwp) :: ip         !<
74    INTEGER(iwp) :: jp         !<
75    INTEGER(iwp) :: kp         !<
[849]76
[1359]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
[849]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
[1359]1098000 FORMAT (I6,1X,F7.2,4X,I10,5X,4(I3,1X,I4,'/',I4,2X),6X,I10)
[849]110
111
112 END SUBROUTINE lpm_write_exchange_statistics
Note: See TracBrowser for help on using the repository browser.