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