source: palm/trunk/SOURCE/lpm_release_set.f90 @ 1524

Last change on this file since 1524 was 1360, checked in by hoffmann, 11 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
1 SUBROUTINE lpm_release_set
2
3!--------------------------------------------------------------------------------!
4! This file is part of PALM.
5!
6! PALM is free software: you can redistribute it and/or modify it under the terms
7! of the GNU General Public License as published by the Free Software Foundation,
8! either version 3 of the License, or (at your option) any later version.
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!
17! Copyright 1997-2014 Leibniz Universitaet Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! ------------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: lpm_release_set.f90 1360 2014-04-11 17:20:32Z keck $
27!
28! 1359 2014-04-11 17:15:14Z hoffmann
29! New particle structure integrated.
30! Kind definition added to all floating point numbers.
31! lpm_init changed form a subroutine to a module.
32!
33! 1327 2014-03-21 11:00:16Z raasch
34! -netcdf output queries
35!
36! 1320 2014-03-20 08:40:49Z raasch
37! ONLY-attribute added to USE-statements,
38! kind-parameters added to all INTEGER and REAL declaration statements,
39! kinds are defined in new module kinds,
40! comment fields (!:) to be used for variable explanations added to
41! all variable declaration statements
42!
43! 1036 2012-10-22 13:43:42Z raasch
44! code put under GPL (PALM 3.9)
45!
46! 849 2012-03-15 10:35:09Z raasch
47! initial revision (former part of advec_particles)
48!
49!
50! Description:
51! ------------
52! Release a new set of particles and, if required, particle tails. These
53! particles/tails are added at the end of the existing arrays. Extend the
54! respective particle and tail arrays, if neccessary.
55!------------------------------------------------------------------------------!
56
57    USE control_parameters,                                                    &
58        ONLY:  iran, message_string, netcdf_data_format
59
60    USE lpm_init_mod,                                                          &
61        ONLY: lpm_create_particle, PHASE_RELEASE
62
63    USE grid_variables,                                                        &
64        ONLY:  dx, dy
65
66    USE indices,                                                               &
67        ONLY:  nxl, nxr, nyn, nys
68
69    USE kinds
70
71    USE particle_attributes,                                                   &
72        ONLY:  minimum_tailpoint_distance, number_of_tails, particles,         &
73               particle_tail_coordinates, use_particle_tails
74
75    IMPLICIT NONE
76
77    INTEGER(iwp) ::  ie     !:
78    INTEGER(iwp) ::  is     !:
79    INTEGER(iwp) ::  n      !:
80    INTEGER(iwp) ::  nn     !:
81
82
83    CALL lpm_create_particle(PHASE_RELEASE)
84!
85!-- particle tails currently not available
86! !
87! !-- Set the beginning of the new particle tails and their age
88!     IF ( use_particle_tails )  THEN
89!
90!        DO  n = is, ie
91! !
92! !--       New particles which should have a tail, already have got a
93! !--       provisional tail id unequal zero (see lpm_init)
94!           IF ( particles(n)%tail_id /= 0 )  THEN
95!
96!              number_of_tails = number_of_tails + 1
97!              nn = number_of_tails
98!              particles(n)%tail_id = nn   ! set the final tail id
99!              particle_tail_coordinates(1,1,nn) = particles(n)%x
100!              particle_tail_coordinates(1,2,nn) = particles(n)%y
101!              particle_tail_coordinates(1,3,nn) = particles(n)%z
102!              particle_tail_coordinates(1,4,nn) = particles(n)%class
103!              particles(n)%tailpoints = 1
104!
105!              IF ( minimum_tailpoint_distance /= 0.0 )  THEN
106!                 particle_tail_coordinates(2,1,nn) = particles(n)%x
107!                 particle_tail_coordinates(2,2,nn) = particles(n)%y
108!                 particle_tail_coordinates(2,3,nn) = particles(n)%z
109!                 particle_tail_coordinates(2,4,nn) = particles(n)%class
110!                 particle_tail_coordinates(1:2,5,nn) = 0.0_wp
111!                 particles(n)%tailpoints = 2
112!              ENDIF
113!
114!           ENDIF
115!
116!        ENDDO
117!
118!     ENDIF
119
120
121 END SUBROUTINE lpm_release_set
Note: See TracBrowser for help on using the repository browser.