SUBROUTINE lpm_release_set !--------------------------------------------------------------------------------! ! This file is part of PALM. ! ! PALM is free software: you can redistribute it and/or modify it under the terms ! of the GNU General Public License as published by the Free Software Foundation, ! either version 3 of the License, or (at your option) any later version. ! ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. ! ! You should have received a copy of the GNU General Public License along with ! PALM. If not, see . ! ! Copyright 1997-2014 Leibniz Universitaet Hannover !--------------------------------------------------------------------------------! ! ! Current revisions: ! ------------------ ! ! ! Former revisions: ! ----------------- ! $Id: lpm_release_set.f90 1360 2014-04-11 17:20:32Z letzel $ ! ! 1359 2014-04-11 17:15:14Z hoffmann ! New particle structure integrated. ! Kind definition added to all floating point numbers. ! lpm_init changed form a subroutine to a module. ! ! 1327 2014-03-21 11:00:16Z raasch ! -netcdf output queries ! ! 1320 2014-03-20 08:40:49Z raasch ! ONLY-attribute added to USE-statements, ! kind-parameters added to all INTEGER and REAL declaration statements, ! kinds are defined in new module kinds, ! comment fields (!:) to be used for variable explanations added to ! all variable declaration statements ! ! 1036 2012-10-22 13:43:42Z raasch ! code put under GPL (PALM 3.9) ! ! 849 2012-03-15 10:35:09Z raasch ! initial revision (former part of advec_particles) ! ! ! Description: ! ------------ ! Release a new set of particles and, if required, particle tails. These ! particles/tails are added at the end of the existing arrays. Extend the ! respective particle and tail arrays, if neccessary. !------------------------------------------------------------------------------! USE control_parameters, & ONLY: iran, message_string, netcdf_data_format USE lpm_init_mod, & ONLY: lpm_create_particle, PHASE_RELEASE USE grid_variables, & ONLY: dx, dy USE indices, & ONLY: nxl, nxr, nyn, nys USE kinds USE particle_attributes, & ONLY: minimum_tailpoint_distance, number_of_tails, particles, & particle_tail_coordinates, use_particle_tails IMPLICIT NONE INTEGER(iwp) :: ie !: INTEGER(iwp) :: is !: INTEGER(iwp) :: n !: INTEGER(iwp) :: nn !: CALL lpm_create_particle(PHASE_RELEASE) ! !-- particle tails currently not available ! ! ! !-- Set the beginning of the new particle tails and their age ! IF ( use_particle_tails ) THEN ! ! DO n = is, ie ! ! ! !-- New particles which should have a tail, already have got a ! !-- provisional tail id unequal zero (see lpm_init) ! IF ( particles(n)%tail_id /= 0 ) THEN ! ! number_of_tails = number_of_tails + 1 ! nn = number_of_tails ! particles(n)%tail_id = nn ! set the final tail id ! particle_tail_coordinates(1,1,nn) = particles(n)%x ! particle_tail_coordinates(1,2,nn) = particles(n)%y ! particle_tail_coordinates(1,3,nn) = particles(n)%z ! particle_tail_coordinates(1,4,nn) = particles(n)%class ! particles(n)%tailpoints = 1 ! ! IF ( minimum_tailpoint_distance /= 0.0 ) THEN ! particle_tail_coordinates(2,1,nn) = particles(n)%x ! particle_tail_coordinates(2,2,nn) = particles(n)%y ! particle_tail_coordinates(2,3,nn) = particles(n)%z ! particle_tail_coordinates(2,4,nn) = particles(n)%class ! particle_tail_coordinates(1:2,5,nn) = 0.0_wp ! particles(n)%tailpoints = 2 ! ENDIF ! ! ENDIF ! ! ENDDO ! ! ENDIF END SUBROUTINE lpm_release_set