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

Last change on this file since 1783 was 1783, checked in by raasch, 8 years ago

NetCDF routines modularized; new parameter netcdf_deflate; further changes in the pmc

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