Ignore:
Timestamp:
Mar 5, 2009 3:33:42 PM (15 years ago)
Author:
heinze
Message:

Output of messages replaced by message handling routine.

File:
1 edited

Legend:

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

    r229 r254  
    22
    33!------------------------------------------------------------------------------!
    4 ! Actual revisions:
     4! Current revisions:
    55! -----------------
     6! Output of messages replaced by message handling routine
    67! Bugfix: arrays for tails are allocated with a minimum size of 10 tails if
    78! there is no tail initially
     
    9798!-- Check the number of particle groups.
    9899    IF ( number_of_particle_groups > max_number_of_particle_groups )  THEN
    99        PRINT*, '+++ WARNING: init_particles: ', &
    100                     'max_number_of_particle_groups =', &
    101                max_number_of_particle_groups
    102        PRINT*, '+++          number_of_particle_groups reset to ', &
    103                max_number_of_particle_groups
     100       WRITE( message_string, * ) 'max_number_of_particle_groups =', &
     101                                  max_number_of_particle_groups , &
     102                                  '&number_of_particle_groups reset to ', &
     103                                  max_number_of_particle_groups
     104       CALL message( 'init_particles', 'PA0213', 0, 1, 0, 6, 0 )
    104105       number_of_particle_groups = max_number_of_particle_groups
    105106    ENDIF
     
    152153       particle_binary_version = '3.0'
    153154       IF ( TRIM( version_on_file ) /= TRIM( particle_binary_version ) )  THEN
    154           IF ( myid == 0 )  THEN
    155              PRINT*, '+++ init_particles: version mismatch concerning data ', &
    156                      'from prior run'
    157              PRINT*, '        version on file    = "', TRIM( version_on_file ),&
    158                      '"'
    159              PRINT*, '        version in program = "', &
    160                      TRIM( particle_binary_version ), '"'
    161           ENDIF
    162           CALL local_stop
     155          message_string = 'version mismatch concerning data from prior run' // &
     156                           '&version on file    = "' // TRIM( version_on_file ) // &
     157                           '&version in program = "' // &
     158                           TRIM( particle_binary_version ) // '"'
     159          CALL message( 'init_particles', 'PA0214', 1, 2, 0, 6, 0 )
    163160       ENDIF
    164161
     
    234231       DO  i = 1, number_of_particle_groups
    235232          IF ( density_ratio(i) /= 0.0  .AND.  radius(i) == 0 )  THEN
    236              IF ( myid == 0 )  THEN
    237                 PRINT*, '+++ init_particles: particle group #', i, 'has a', &
    238                         'density ratio /= 0 but radius = 0'
    239              ENDIF
    240              CALL local_stop
     233             WRITE( message_string, * ) 'particle group #', i, 'has a', &
     234                                        'density ratio /= 0 but radius = 0'
     235             CALL message( 'init_particles', 'PA0215', 1, 2, 0, 6, 0 )
    241236          ENDIF
    242237          particle_groups(i)%density_ratio = density_ratio(i)
     
    273268                            n = n + 1
    274269                            IF ( n > maximum_number_of_particles )  THEN
    275                                PRINT*,'+++ init_particles: number of initial', &
    276                                       ' particles (', n, ') exceeds'
    277                                PRINT*,'    maximum_number_of_particles (',     &
    278                                       maximum_number_of_particles, ') on PE ', &
    279                                       myid
    280 #if defined( __parallel )
    281                                CALL MPI_ABORT( comm2d, 9999, ierr )
    282 #else
    283                                CALL local_stop
    284 #endif
     270                               WRITE( message_string, * ) 'number of initial', &
     271                                             'particles (', n, ') exceeds', &
     272                                             '&maximum_number_of_particles (', &
     273                                             maximum_number_of_particles, ') on PE ', &
     274                                             myid
     275                               CALL message( 'init_particles', 'PA0216', 2, 2, 0, 6, 0 )
    285276                            ENDIF
    286277                            particles(n)%x             = pos_x
     
    519510         
    520511       CASE DEFAULT
    521           IF ( myid == 0 )  THEN
    522              PRINT*,'+++ init_particles: unknown boundary condition ',   &
    523                          'bc_par_b = "', TRIM( bc_par_b ), '"'
    524           ENDIF
    525           CALL local_stop
     512          WRITE( message_string, * )  'unknown boundary condition ',   &
     513                                       'bc_par_b = "', TRIM( bc_par_b ), '"'
     514          CALL message( 'init_particles', 'PA0217', 1, 2, 0, 6, 0 )
    526515         
    527516    END SELECT
     
    535524         
    536525       CASE DEFAULT
    537           IF ( myid == 0 )  THEN
    538              PRINT*,'+++ init_particles: unknown boundary condition ',   &
    539                          'bc_par_t = "', TRIM( bc_par_t ), '"'
    540           ENDIF
    541           CALL local_stop
     526          WRITE( message_string, * ) 'unknown boundary condition ',   &
     527                                     'bc_par_t = "', TRIM( bc_par_t ), '"'
     528          CALL message( 'init_particles', 'PA0218', 1, 2, 0, 6, 0 )
    542529         
    543530    END SELECT
     
    554541         
    555542       CASE DEFAULT
    556           IF ( myid == 0 )  THEN
    557              PRINT*,'+++ init_particles: unknown boundary condition ',   &
    558                          'bc_par_lr = "', TRIM( bc_par_lr ), '"'
    559           ENDIF
    560           CALL local_stop
     543          WRITE( message_string, * ) 'unknown boundary condition ',   &
     544                                     'bc_par_lr = "', TRIM( bc_par_lr ), '"'
     545          CALL message( 'init_particles', 'PA0219', 1, 2, 0, 6, 0 )
    561546         
    562547    END SELECT
     
    573558         
    574559       CASE DEFAULT
    575           IF ( myid == 0 )  THEN
    576              PRINT*,'+++ init_particles: unknown boundary condition ',   &
    577                          'bc_par_ns = "', TRIM( bc_par_ns ), '"'
    578           ENDIF
    579           CALL local_stop
     560          WRITE( message_string, * ) 'unknown boundary condition ',   &
     561                                     'bc_par_ns = "', TRIM( bc_par_ns ), '"'
     562          CALL message( 'init_particles', 'PA0220', 1, 2, 0, 6, 0 )
    580563         
    581564    END SELECT
Note: See TracChangeset for help on using the changeset viewer.