Ignore:
Timestamp:
Apr 7, 2016 7:49:42 AM (8 years ago)
Author:
hoffmann
Message:

changes in LPM and bulk cloud microphysics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/lpm_exchange_horiz.f90

    r1818 r1822  
    1919! Current revisions:
    2020! ------------------
    21 !
     21! Tails removed. Unused variables removed.
    2222!
    2323! Former revisions:
     
    6767! Description:
    6868! ------------
    69 !> Exchange of particles (and tails) between the subdomains.
     69! Exchange of particles between the subdomains.
    7070!------------------------------------------------------------------------------!
    7171 MODULE lpm_exchange_horiz_mod
     
    9393
    9494    USE particle_attributes,                                                   &
    95         ONLY:  alloc_factor, deleted_particles, deleted_tails, grid_particles, &
    96                ibc_par_lr, ibc_par_ns, maximum_number_of_tails,                &
    97                maximum_number_of_tailpoints, min_nr_particle,                  &
    98                mpi_particle_type, number_of_tails, number_of_particles,        &
    99                offset_ocean_nzt, particles,                                    &
    100                particle_tail_coordinates, particle_type, prt_count,            &
    101                tail_mask, trlp_count_sum,                                      &
     95        ONLY:  alloc_factor, deleted_particles, grid_particles,                &
     96               ibc_par_lr, ibc_par_ns, min_nr_particle,                        &
     97               mpi_particle_type, number_of_particles,                         &
     98               offset_ocean_nzt, offset_ocean_nzt_m1, particles,               &
     99               particle_type, prt_count, trlp_count_sum,                       &
    102100               trlp_count_recv_sum, trnp_count_sum, trnp_count_recv_sum,       &
    103101               trrp_count_sum, trrp_count_recv_sum, trsp_count_sum,            &
    104                trsp_count_recv_sum, use_particle_tails, zero_particle
     102               trsp_count_recv_sum, zero_particle
    105103
    106104    USE pegrid
     
    156154    INTEGER(iwp) ::  j                                       !<
    157155    INTEGER(iwp) ::  jp                                      !<
    158     INTEGER(iwp) ::  k                                       !<
    159156    INTEGER(iwp) ::  kp                                      !<
    160157    INTEGER(iwp) ::  n                                       !<
    161     INTEGER(iwp) ::  nn                                      !<
    162     INTEGER(iwp) ::  tlength                                 !<
    163158    INTEGER(iwp) ::  trlp_count                              !<
    164159    INTEGER(iwp) ::  trlp_count_recv                         !<
     
    178173    INTEGER(iwp) ::  trspt_count_recv                        !<
    179174
    180     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  trlpt        !<
    181     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  trnpt        !<
    182     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  trrpt        !<
    183     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  trspt        !<
    184 
    185175    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  rvlp  !<
    186176    TYPE(particle_type), DIMENSION(:), ALLOCATABLE ::  rvnp  !<
     
    196186#if defined( __parallel )
    197187
     188!
     189!-- Exchange between subdomains.
     190!-- As soon as one particle has moved beyond the boundary of the domain, it
     191!-- is included in the relevant transfer arrays and marked for subsequent
     192!-- deletion on this PE.
     193!-- First sweep for crossings in x direction. Find out first the number of
     194!-- particles to be transferred and allocate temporary arrays needed to store
     195!-- them.
     196!-- For a one-dimensional decomposition along y, no transfer is necessary,
     197!-- because the particle remains on the PE, but the particle coordinate has to
     198!-- be adjusted.
    198199    trlp_count  = 0
    199200    trlpt_count = 0
     
    226227                      IF ( i < nxl )  THEN
    227228                         trlp_count = trlp_count + 1
    228                          IF ( particles(n)%tail_id /= 0 )  trlpt_count = trlpt_count + 1
    229229                      ELSEIF ( i > nxr )  THEN
    230230                         trrp_count = trrp_count + 1
    231                          IF ( particles(n)%tail_id /= 0 )  trrpt_count = trrpt_count + 1
    232231                      ENDIF
    233232                   ENDIF
     
    247246       trlp = zero_particle
    248247       trrp = zero_particle
    249 
    250        IF ( use_particle_tails )  THEN
    251           ALLOCATE( trlpt(maximum_number_of_tailpoints,5,trlpt_count), &
    252                     trrpt(maximum_number_of_tailpoints,5,trrpt_count) )
    253           tlength = maximum_number_of_tailpoints * 5
    254        ENDIF
    255248
    256249       trlp_count  = 0
     
    269262             particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
    270263             DO  n = 1, number_of_particles
    271 
    272                 nn = particles(n)%tail_id
    273264!
    274265!--             Only those particles that have not been marked as 'deleted' may
     
    292283                               particles(n)%origin_x = ( nx + 1 ) * dx + &
    293284                               particles(n)%origin_x
    294                                IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    295                                   i  = particles(n)%tailpoints
    296                                   particle_tail_coordinates(1:i,1,nn) = ( nx + 1 ) * dx &
    297                                   + particle_tail_coordinates(1:i,1,nn)
    298                                ENDIF
    299285                            ELSE
    300286                               trlp_count = trlp_count + 1
     
    312298                               ENDIF
    313299
    314                                IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    315                                   trlpt_count = trlpt_count + 1
    316                                   trlpt(:,:,trlpt_count) = particle_tail_coordinates(:,:,nn)
    317                                   trlpt(:,1,trlpt_count) = ( nx + 1 ) * dx + &
    318                                   trlpt(:,1,trlpt_count)
    319                                   tail_mask(nn) = .FALSE.
    320                                   deleted_tails = deleted_tails + 1
    321                                ENDIF
    322300                            ENDIF
    323301
     
    327305                            particles(n)%particle_mask = .FALSE.
    328306                            deleted_particles = deleted_particles + 1
    329                             IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    330                                tail_mask(nn) = .FALSE.
    331                                deleted_tails = deleted_tails + 1
    332                             ENDIF
    333307
    334308                         ELSEIF ( ibc_par_lr == 2 )  THEN
     
    348322                         deleted_particles = deleted_particles + 1
    349323
    350                          IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    351                             trlpt_count = trlpt_count + 1
    352                             trlpt(:,:,trlpt_count) = particle_tail_coordinates(:,:,nn)
    353                             tail_mask(nn) = .FALSE.
    354                             deleted_tails = deleted_tails + 1
    355                          ENDIF
    356324                      ENDIF
    357325
     
    367335                               particles(n)%origin_x = particles(n)%origin_x - &
    368336                               ( nx + 1 ) * dx
    369                                IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    370                                   i = particles(n)%tailpoints
    371                                   particle_tail_coordinates(1:i,1,nn) = - ( nx+1 ) * dx &
    372                                   + particle_tail_coordinates(1:i,1,nn)
    373                                ENDIF
    374337                            ELSE
    375338                               trrp_count = trrp_count + 1
     
    381344                               deleted_particles = deleted_particles + 1
    382345
    383                                IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    384                                   trrpt_count = trrpt_count + 1
    385                                   trrpt(:,:,trrpt_count) = particle_tail_coordinates(:,:,nn)
    386                                   trrpt(:,1,trrpt_count) = trrpt(:,1,trrpt_count) - &
    387                                   ( nx + 1 ) * dx
    388                                   tail_mask(nn) = .FALSE.
    389                                   deleted_tails = deleted_tails + 1
    390                                ENDIF
    391346                            ENDIF
    392347
     
    396351                            particles(n)%particle_mask = .FALSE.
    397352                            deleted_particles = deleted_particles + 1
    398                             IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    399                                tail_mask(nn) = .FALSE.
    400                                deleted_tails = deleted_tails + 1
    401                             ENDIF
    402353
    403354                         ELSEIF ( ibc_par_lr == 2 )  THEN
     
    417368                         deleted_particles = deleted_particles + 1
    418369
    419                          IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    420                             trrpt_count = trrpt_count + 1
    421                             trrpt(:,:,trrpt_count) = particle_tail_coordinates(:,:,nn)
    422                             tail_mask(nn) = .FALSE.
    423                             deleted_tails = deleted_tails + 1
    424                          ENDIF
    425370                      ENDIF
    426371
     
    452397       DEALLOCATE(rvrp)
    453398
    454        IF ( use_particle_tails )  THEN
    455 
    456           CALL MPI_SENDRECV( trlpt_count,      1, MPI_INTEGER, pleft,  0, &
    457                              trrpt_count_recv, 1, MPI_INTEGER, pright, 0, &
    458                              comm2d, status, ierr )
    459 
    460           IF ( number_of_tails+trrpt_count_recv > maximum_number_of_tails ) &
    461           THEN
    462              IF ( netcdf_data_format < 3 )  THEN
    463                 message_string = 'maximum_number_of_tails ' //   &
    464                                  'needs to be increased ' //     &
    465                                  '&but this is not allowed wi'// &
    466                                  'th netcdf_data_format < 3'
    467                 CALL message( 'lpm_exch_horiz', 'PA0147', 2, 2, -1, 6, 1 )
    468              ELSE
    469                 CALL lpm_extend_tail_array( trrpt_count_recv )
    470              ENDIF
    471           ENDIF
    472 
    473           CALL MPI_SENDRECV( trlpt(1,1,1), trlpt_count*tlength, MPI_REAL,      &
    474                              pleft, 1,                                         &
    475                              particle_tail_coordinates(1,1,number_of_tails+1), &
    476                              trrpt_count_recv*tlength, MPI_REAL, pright, 1,    &
    477                              comm2d, status, ierr )
    478 !
    479 !--       Update the tail ids for the transferred particles
    480           nn = number_of_tails
    481           DO  n = number_of_particles+1, number_of_particles+trrp_count_recv
    482              IF ( particles(n)%tail_id /= 0 )  THEN
    483                 nn = nn + 1
    484                 particles(n)%tail_id = nn
    485              ENDIF
    486           ENDDO
    487 
    488        ENDIF
    489 
    490399!
    491400!--    Send right boundary, receive left boundary
     
    503412       IF ( trlp_count_recv > 0 )  CALL Add_particles_to_gridcell(rvlp(1:trlp_count_recv))
    504413
    505        DEALLOCATE(rvlp)
    506 
    507        IF ( use_particle_tails )  THEN
    508 
    509           CALL MPI_SENDRECV( trrpt_count,      1, MPI_INTEGER, pright, 0, &
    510                              trlpt_count_recv, 1, MPI_INTEGER, pleft,  0, &
    511                              comm2d, status, ierr )
    512 
    513           IF ( number_of_tails+trlpt_count_recv > maximum_number_of_tails ) &
    514           THEN
    515              IF ( netcdf_data_format < 3 )  THEN
    516                 message_string = 'maximum_number_of_tails ' //   &
    517                                  'needs to be increased ' //     &
    518                                  '&but this is not allowed wi'// &
    519                                  'th netcdf_data_format < 3'
    520                 CALL message( 'lpm_exch_horiz', 'PA0147', 2, 2, -1, 6, 1 )
    521              ELSE
    522                 CALL lpm_extend_tail_array( trlpt_count_recv )
    523              ENDIF
    524           ENDIF
    525 
    526           CALL MPI_SENDRECV( trrpt(1,1,1), trrpt_count*tlength, MPI_REAL,      &
    527                              pright, 1,                                        &
    528                              particle_tail_coordinates(1,1,number_of_tails+1), &
    529                              trlpt_count_recv*tlength, MPI_REAL, pleft, 1,     &
    530                              comm2d, status, ierr )
    531 !
    532 !--       Update the tail ids for the transferred particles
    533           nn = number_of_tails
    534           DO  n = number_of_particles+1, number_of_particles+trlp_count_recv
    535              IF ( particles(n)%tail_id /= 0 )  THEN
    536                 nn = nn + 1
    537                 particles(n)%tail_id = nn
    538              ENDIF
    539           ENDDO
    540 
    541        ENDIF
    542 
    543 !       number_of_particles = number_of_particles + trlp_count_recv
    544 !       number_of_tails     = number_of_tails     + trlpt_count_recv
    545 
    546        IF ( use_particle_tails )  THEN
    547           DEALLOCATE( trlpt, trrpt )
    548        ENDIF
     414       DEALLOCATE( rvlp )
    549415       DEALLOCATE( trlp, trrp )
    550416
     
    589455                      IF ( j < nys )  THEN
    590456                         trsp_count = trsp_count + 1
    591                          IF ( particles(n)%tail_id /= 0 )  trspt_count = trspt_count + 1
    592457                      ELSEIF ( j > nyn )  THEN
    593458                         trnp_count = trnp_count + 1
    594                          IF ( particles(n)%tail_id /= 0 )  trnpt_count = trnpt_count + 1
    595459                      ENDIF
    596460                   ENDIF
     
    609473       trsp = zero_particle
    610474       trnp = zero_particle
    611 
    612        IF ( use_particle_tails )  THEN
    613           ALLOCATE( trspt(maximum_number_of_tailpoints,5,trspt_count), &
    614                     trnpt(maximum_number_of_tailpoints,5,trnpt_count) )
    615           tlength = maximum_number_of_tailpoints * 5
    616        ENDIF
    617475
    618476       trsp_count  = nr_move_south
     
    633491             particles => grid_particles(kp,jp,ip)%particles(1:number_of_particles)
    634492             DO  n = 1, number_of_particles
    635 
    636                 nn = particles(n)%tail_id
    637493!
    638494!--             Only those particles that have not been marked as 'deleted' may
     
    655511                               particles(n)%origin_y = ( ny + 1 ) * dy + &
    656512                               particles(n)%origin_y
    657                                IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    658                                   i = particles(n)%tailpoints
    659                                   particle_tail_coordinates(1:i,2,nn) =        &
    660                                      ( ny+1 ) * dy + particle_tail_coordinates(1:i,2,nn)
    661                                ENDIF
    662513                            ELSE
    663514                               trsp_count = trsp_count + 1
     
    677528                               ENDIF
    678529
    679                                IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    680                                   trspt_count = trspt_count + 1
    681                                   trspt(:,:,trspt_count) = &
    682                                   particle_tail_coordinates(:,:,nn)
    683                                   trspt(:,2,trspt_count) = ( ny + 1 ) * dy + &
    684                                   trspt(:,2,trspt_count)
    685                                   tail_mask(nn) = .FALSE.
    686                                   deleted_tails = deleted_tails + 1
    687                                ENDIF
    688530                            ENDIF
    689531
     
    693535                            particles(n)%particle_mask = .FALSE.
    694536                            deleted_particles = deleted_particles + 1
    695                             IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    696                                tail_mask(nn) = .FALSE.
    697                                deleted_tails = deleted_tails + 1
    698                             ENDIF
    699537
    700538                         ELSEIF ( ibc_par_ns == 2 )  THEN
     
    714552                         deleted_particles = deleted_particles + 1
    715553
    716                          IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    717                             trspt_count = trspt_count + 1
    718                             trspt(:,:,trspt_count) = particle_tail_coordinates(:,:,nn)
    719                             tail_mask(nn) = .FALSE.
    720                             deleted_tails = deleted_tails + 1
    721                          ENDIF
    722554                      ENDIF
    723555
     
    733565                               particles(n)%origin_y =                         &
    734566                                  particles(n)%origin_y - ( ny + 1 ) * dy
    735                                IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    736                                   i = particles(n)%tailpoints
    737                                   particle_tail_coordinates(1:i,2,nn) =        &
    738                                      - (ny+1) * dy + particle_tail_coordinates(1:i,2,nn)
    739                                ENDIF
    740567                            ELSE
    741568                               trnp_count = trnp_count + 1
     
    747574                               particles(n)%particle_mask = .FALSE.
    748575                               deleted_particles = deleted_particles + 1
    749                                IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    750                                   trnpt_count = trnpt_count + 1
    751                                   trnpt(:,:,trnpt_count) =                     &
    752                                      particle_tail_coordinates(:,:,nn)
    753                                   trnpt(:,2,trnpt_count) =                     &
    754                                      trnpt(:,2,trnpt_count) - ( ny + 1 ) * dy
    755                                   tail_mask(nn) = .FALSE.
    756                                   deleted_tails = deleted_tails + 1
    757                                ENDIF
    758576                            ENDIF
    759577
     
    763581                            particles(n)%particle_mask = .FALSE.
    764582                            deleted_particles = deleted_particles + 1
    765                             IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    766                                tail_mask(nn) = .FALSE.
    767                                deleted_tails = deleted_tails + 1
    768                             ENDIF
    769583
    770584                         ELSEIF ( ibc_par_ns == 2 )  THEN
     
    784598                         deleted_particles = deleted_particles + 1
    785599
    786                          IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    787                             trnpt_count = trnpt_count + 1
    788                             trnpt(:,:,trnpt_count) = particle_tail_coordinates(:,:,nn)
    789                             tail_mask(nn) = .FALSE.
    790                             deleted_tails = deleted_tails + 1
    791                          ENDIF
    792600                      ENDIF
    793601
     
    819627       DEALLOCATE(rvnp)
    820628
    821        IF ( use_particle_tails )  THEN
    822 
    823           CALL MPI_SENDRECV( trspt_count,      1, MPI_INTEGER, psouth, 0, &
    824                              trnpt_count_recv, 1, MPI_INTEGER, pnorth, 0, &
    825                              comm2d, status, ierr )
    826 
    827           IF ( number_of_tails+trnpt_count_recv > maximum_number_of_tails ) &
    828           THEN
    829              IF ( netcdf_data_format < 3 )  THEN
    830                 message_string = 'maximum_number_of_tails ' //    &
    831                                  'needs to be increased ' //      &
    832                                  '&but this is not allowed wi' // &
    833                                  'th netcdf_data_format < 3'
    834                 CALL message( 'lpm_exch_horiz', 'PA0147', 2, 2, -1, 6, 1 )
    835              ELSE
    836                 CALL lpm_extend_tail_array( trnpt_count_recv )
    837              ENDIF
    838           ENDIF
    839 
    840           CALL MPI_SENDRECV( trspt(1,1,1), trspt_count*tlength, MPI_REAL,      &
    841                              psouth, 1,                                        &
    842                              particle_tail_coordinates(1,1,number_of_tails+1), &
    843                              trnpt_count_recv*tlength, MPI_REAL, pnorth, 1,    &
    844                              comm2d, status, ierr )
    845 
    846 !
    847 !--       Update the tail ids for the transferred particles
    848           nn = number_of_tails
    849           DO  n = number_of_particles+1, number_of_particles+trnp_count_recv
    850              IF ( particles(n)%tail_id /= 0 )  THEN
    851                 nn = nn + 1
    852                 particles(n)%tail_id = nn
    853              ENDIF
    854           ENDDO
    855 
    856        ENDIF
    857 
    858 !       number_of_particles = number_of_particles + trnp_count_recv
    859 !       number_of_tails     = number_of_tails     + trnpt_count_recv
    860 
    861629!
    862630!--    Send back boundary, receive front boundary
     
    876644       DEALLOCATE(rvsp)
    877645
    878        IF ( use_particle_tails )  THEN
    879 
    880           CALL MPI_SENDRECV( trnpt_count,      1, MPI_INTEGER, pnorth, 0, &
    881                              trspt_count_recv, 1, MPI_INTEGER, psouth, 0, &
    882                              comm2d, status, ierr )
    883 
    884           IF ( number_of_tails+trspt_count_recv > maximum_number_of_tails ) &
    885           THEN
    886              IF ( netcdf_data_format < 3 )  THEN
    887                 message_string = 'maximum_number_of_tails ' //   &
    888                                  'needs to be increased ' //     &
    889                                  '&but this is not allowed wi'// &
    890                                  'th NetCDF output switched on'
    891                 CALL message( 'lpm_exch_horiz', 'PA0147', 2, 2, -1, 6, 1 )
    892              ELSE
    893                 CALL lpm_extend_tail_array( trspt_count_recv )
    894              ENDIF
    895           ENDIF
    896 
    897           CALL MPI_SENDRECV( trnpt(1,1,1), trnpt_count*tlength, MPI_REAL,      &
    898                              pnorth, 1,                                        &
    899                              particle_tail_coordinates(1,1,number_of_tails+1), &
    900                              trspt_count_recv*tlength, MPI_REAL, psouth, 1,    &
    901                              comm2d, status, ierr )
    902 !
    903 !--       Update the tail ids for the transferred particles
    904           nn = number_of_tails
    905           DO  n = number_of_particles+1, number_of_particles+trsp_count_recv
    906              IF ( particles(n)%tail_id /= 0 )  THEN
    907                 nn = nn + 1
    908                 particles(n)%tail_id = nn
    909              ENDIF
    910           ENDDO
    911 
    912        ENDIF
    913 
    914646       number_of_particles = number_of_particles + trsp_count_recv
    915        number_of_tails     = number_of_tails     + trspt_count_recv
    916 
    917        IF ( use_particle_tails )  THEN
    918           DEALLOCATE( trspt, trnpt )
    919        ENDIF
     647
    920648       DEALLOCATE( trsp, trnp )
    921649
     
    928656    DO  n = 1, number_of_particles
    929657
    930        nn = particles(n)%tail_id
    931 
    932658       IF ( particles(n)%x < -0.5_wp * dx )  THEN
    933659
     
    936662!--          Cyclic boundary. Relevant coordinate has to be changed.
    937663             particles(n)%x = ( nx + 1 ) * dx + particles(n)%x
    938              IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    939                 i = particles(n)%tailpoints
    940                 particle_tail_coordinates(1:i,1,nn) = ( nx + 1 ) * dx + &
    941                                              particle_tail_coordinates(1:i,1,nn)
    942              ENDIF
     664
    943665          ELSEIF ( ibc_par_lr == 1 )  THEN
    944666!
     
    946668             particles(n)%particle_mask = .FALSE.
    947669             deleted_particles = deleted_particles + 1
    948              IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    949                 tail_mask(nn) = .FALSE.
    950                 deleted_tails = deleted_tails + 1
    951              ENDIF
     670
    952671          ELSEIF ( ibc_par_lr == 2 )  THEN
    953672!
     
    963682!--          Cyclic boundary. Relevant coordinate has to be changed.
    964683             particles(n)%x = particles(n)%x - ( nx + 1 ) * dx
    965              IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    966                 i = particles(n)%tailpoints
    967                 particle_tail_coordinates(1:i,1,nn) = - ( nx + 1 ) * dx + &
    968                                              particle_tail_coordinates(1:i,1,nn)
    969              ENDIF
     684
    970685          ELSEIF ( ibc_par_lr == 1 )  THEN
    971686!
     
    973688             particles(n)%particle_mask = .FALSE.
    974689             deleted_particles = deleted_particles + 1
    975              IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    976                 tail_mask(nn) = .FALSE.
    977                 deleted_tails = deleted_tails + 1
    978              ENDIF
     690
    979691          ELSEIF ( ibc_par_lr == 2 )  THEN
    980692!
     
    992704!--          Cyclic boundary. Relevant coordinate has to be changed.
    993705             particles(n)%y = ( ny + 1 ) * dy + particles(n)%y
    994              IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    995                 i = particles(n)%tailpoints
    996                 particle_tail_coordinates(1:i,2,nn) = ( ny + 1 ) * dy + &
    997                                              particle_tail_coordinates(1:i,2,nn)
    998              ENDIF
     706
    999707          ELSEIF ( ibc_par_ns == 1 )  THEN
    1000708!
     
    1002710             particles(n)%particle_mask = .FALSE.
    1003711             deleted_particles = deleted_particles + 1
    1004              IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    1005                 tail_mask(nn) = .FALSE.
    1006                 deleted_tails = deleted_tails + 1
    1007              ENDIF
     712
    1008713          ELSEIF ( ibc_par_ns == 2 )  THEN
    1009714!
     
    1019724!--          Cyclic boundary. Relevant coordinate has to be changed.
    1020725             particles(n)%y = particles(n)%y - ( ny + 1 ) * dy
    1021              IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    1022                 i = particles(n)%tailpoints
    1023                 particle_tail_coordinates(1:i,2,nn) = - ( ny + 1 ) * dy + &
    1024                                              particle_tail_coordinates(1:i,2,nn)
    1025              ENDIF
     726
    1026727          ELSEIF ( ibc_par_ns == 1 )  THEN
    1027728!
     
    1029730             particles(n)%particle_mask = .FALSE.
    1030731             deleted_particles = deleted_particles + 1
    1031              IF ( use_particle_tails  .AND.  nn /= 0 )  THEN
    1032                 tail_mask(nn) = .FALSE.
    1033                 deleted_tails = deleted_tails + 1
    1034              ENDIF
     732
    1035733          ELSEIF ( ibc_par_ns == 2 )  THEN
    1036734!
     
    1287985    INTEGER(iwp), INTENT(in)                       ::  j              !<
    1288986    INTEGER(iwp), INTENT(in)                       ::  k              !<
    1289     INTEGER(iwp), INTENT(in), optional             ::  size_in        !<
     987    INTEGER(iwp), INTENT(in), OPTIONAL             ::  size_in        !<
    1290988
    1291989    INTEGER(iwp)                                   :: old_size        !<
     
    1300998       new_size = size_in
    1301999    ELSE
    1302        new_size = old_size * ( 1.0 + alloc_factor / 100.0 )
     1000       new_size = old_size * ( 1.0_wp + alloc_factor / 100.0_wp )
    13031001    ENDIF
    13041002
Note: See TracChangeset for help on using the changeset viewer.