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

Last change on this file since 2106 was 2101, checked in by suehring, 8 years ago

last commit documented

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