Changeset 230


Ignore:
Timestamp:
Feb 6, 2009 9:32:58 AM (15 years ago)
Author:
heinze
Message:

Output of messages replaced by message handling routine

Location:
palm/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r229 r230  
    66-------
    77
     8Output of messages replaced by message handling routine
     9
     10advec_particles, sort_particles
    811
    912Errors:
  • palm/trunk/SOURCE/advec_particles.f90

    r229 r230  
    22
    33!------------------------------------------------------------------------------!
    4 ! Actual revisions:
     4! Current revisions:
    55! -----------------
     6! Output of messages replaced by message handling routine
    67! Bugfix: several tail counters are initialized, particle_tail_coordinates is
    78! only written to file if its third index is > 0
     
    314315                                      ( rho_surface * dx * dy * dz )
    315316          IF ( ql_c(k,j,i) > 100.0 )  THEN
    316              print*,'+++ advec_particles k=',k,' j=',j,' i=',i, &
    317                           ' ql_c=',ql_c(k,j,i), ' part(',n,')%wf=', &
     317             WRITE( message_string, * ) 'k=',k,' j=',j,' i=',i, &
     318                          ' ql_c=',ql_c(k,j,i), ' &part(',n,')%wf=', &
    318319                          particles(n)%weight_factor,' delta_r=',delta_r
    319 #if defined( __parallel )
    320              CALL MPI_ABORT( comm2d, 9999, ierr )
    321 #else
    322              STOP
    323 #endif
     320             CALL message( 'advec_particles', 'PA0143', 2, 2, 0, 6, 0 )
    324321          ENDIF
    325322
     
    328325          IF ( ( new_r - particles(n)%radius ) < 0.0  .AND.  new_r < 0.0 ) &
    329326          THEN
    330              print*,'+++ advec_particles #1 k=',k,' j=',j,' i=',i, &
     327             WRITE( message_string, * ) '#1 k=',k,' j=',j,' i=',i, &
    331328                          ' e_s=',e_s, ' e_a=',e_a,' t_int=',t_int, &
    332                           ' d_radius=',d_radius,' delta_r=',delta_r,&
     329                          ' &d_radius=',d_radius,' delta_r=',delta_r,&
    333330                          ' particle_radius=',particles(n)%radius
    334 #if defined( __parallel )
    335              CALL MPI_ABORT( comm2d, 9999, ierr )
    336 #else
    337              STOP
    338 #endif
     331             CALL message( 'advec_particles', 'PA0144', 2, 2, 0, 6, 0 )
    339332          ENDIF
    340333          particles(n)%radius = new_r
     
    427420                           effective_coll_efficiency < 0.0 )     &
    428421                      THEN
    429                          print*,'+++ advec_particles  collision_efficiency ', &
    430                                    'out of range:', effective_coll_efficiency
    431 #if defined( __parallel )
    432                          CALL MPI_ABORT( comm2d, 9999, ierr )
    433 #else
    434                          STOP
    435 #endif
    436                       ENDIF
     422                         WRITE( message_string, * )   'collision_efficiency ' , &
     423                                   'out of range:' ,effective_coll_efficiency
     424                         CALL message( 'advec_particles', 'PA0145', 2, 2, 0, 6, 0 )
     425                      END IF
    437426
    438427!
     
    19271916               maximum_number_of_particles  )  THEN
    19281917             IF ( netcdf_output )  THEN
    1929                 PRINT*, '+++ advec_particles:  maximum_number_of_particles ', &
    1930                                                'needs to be increased'
    1931                 PRINT*, '                      but this is not allowed with ', &
    1932                                                'NetCDF output switched on'
    1933 #if defined( __parallel )
    1934                 CALL MPI_ABORT( comm2d, 9999, ierr )
    1935 #else
    1936                 CALL local_stop
    1937 #endif
     1918                message_string = 'maximum_number_of_particles ' // &
     1919                                 'needs to be increased ' // &
     1920                                 '&but this is not allowed with ' // &
     1921                                 'NetCDF output switched on'
     1922                CALL message( 'advec_particles', 'PA0146', 2, 2, 0, 6, 0 )
    19381923             ELSE
    19391924!    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory dt_prel'
     
    19511936                  maximum_number_of_tails  )  THEN
    19521937                IF ( netcdf_output )  THEN
    1953                    PRINT*, '+++ advec_particles:  maximum_number_of_tails ', &
    1954                                                   'needs to be increased'
    1955                    PRINT*, '                      but this is not allowed wi', &
    1956                                                   'th NetCDF output switched on'
    1957 #if defined( __parallel )
    1958                    CALL MPI_ABORT( comm2d, 9999, ierr )
    1959 #else
    1960                    CALL local_stop
    1961 #endif
     1938                   message_string = 'maximum_number_of_tails ' // &
     1939                                    'needs to be increased ' // &
     1940                                    '&but this is not allowed wi' // &
     1941                                    'th NetCDF output switched on'
     1942                   CALL message( 'advec_particles', 'PA0147', 2, 2, 0, 6, 0 )
    19621943                ELSE
    19631944!    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory dt_prel'
     
    23402321          THEN
    23412322             IF ( netcdf_output )  THEN
    2342                 PRINT*, '+++ advec_particles:  maximum_number_of_particles ', &
    2343                                                'needs to be increased'
    2344                 PRINT*, '                      but this is not allowed with ', &
    2345                                                'NetCDF output switched on'
    2346                 CALL MPI_ABORT( comm2d, 9999, ierr )
     2323                 message_string = 'maximum_number_of_particles ' // &
     2324                                  'needs to be increased ' // &
     2325                                  '&but this is not allowed with ' // &
     2326                                  'NetCDF output switched on'
     2327                CALL message( 'advec_particles', 'PA0146', 2, 2, 0, 6, 0 )
    23472328             ELSE
    23482329!    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trrp'
     
    23682349             THEN
    23692350                IF ( netcdf_output )  THEN
    2370                    PRINT*, '+++ advec_particles:  maximum_number_of_tails ', &
    2371                                                   'needs to be increased'
    2372                    PRINT*, '                      but this is not allowed wi', &
    2373                                                   'th NetCDF output switched on'
    2374                    CALL MPI_ABORT( comm2d, 9999, ierr )
     2351                   message_string = 'maximum_number_of_tails ' // &
     2352                                    'needs to be increased ' // &
     2353                                    '&but this is not allowed wi'// &
     2354                                    'th NetCDF output switched on'
     2355                CALL message( 'advec_particles', 'PA0147', 2, 2, 0, 6, 0 )
    23752356                ELSE
    23762357!    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trrpt'
     
    24172398          THEN
    24182399             IF ( netcdf_output )  THEN
    2419                 PRINT*, '+++ advec_particles:  maximum_number_of_particles ', &
    2420                                                'needs to be increased'
    2421                 PRINT*, '                      but this is not allowed with ', &
    2422                                                'NetCDF output switched on'
    2423                 CALL MPI_ABORT( comm2d, 9999, ierr )
     2400                message_string = 'maximum_number_of_particles ' // &
     2401                                 'needs to be increased ' // &
     2402                                 '&but this is not allowed with '// &
     2403                                 'NetCDF output switched on'
     2404                CALL message( 'advec_particles', 'PA0146', 2, 2, 0, 6, 0 )
    24242405             ELSE
    24252406!    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trlp'
     
    24452426             THEN
    24462427                IF ( netcdf_output )  THEN
    2447                    PRINT*, '+++ advec_particles:  maximum_number_of_tails ', &
    2448                                                   'needs to be increased'
    2449                    PRINT*, '                      but this is not allowed wi', &
    2450                                                   'th NetCDF output switched on'
    2451                    CALL MPI_ABORT( comm2d, 9999, ierr )
     2428                   message_string = 'maximum_number_of_tails ' // &
     2429                                    'needs to be increased ' // &
     2430                                    '&but this is not allowed wi'// &
     2431                                    'th NetCDF output switched on'
     2432                   CALL message( 'advec_particles', 'PA0147', 2, 2, 0, 6, 0 )
    24522433                ELSE
    24532434!    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trlpt'
     
    27812762          THEN
    27822763             IF ( netcdf_output )  THEN
    2783                 PRINT*, '+++ advec_particles:  maximum_number_of_particles ', &
    2784                                                'needs to be increased'
    2785                 PRINT*, '                      but this is not allowed with ', &
    2786                                                'NetCDF output switched on'
    2787                 CALL MPI_ABORT( comm2d, 9999, ierr )
     2764                message_string = 'maximum_number_of_particles ' // &
     2765                                 'needs to be increased ' // &
     2766                                 '&but this is not allowed with '// &
     2767                                 'NetCDF output switched on'
     2768                CALL message( 'advec_particles', 'PA0146', 2, 2, 0, 6, 0 )
    27882769             ELSE
    27892770!    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trnp'
     
    28092790             THEN
    28102791                IF ( netcdf_output )  THEN
    2811                    PRINT*, '+++ advec_particles:  maximum_number_of_tails ', &
    2812                                                   'needs to be increased'
    2813                    PRINT*, '                      but this is not allowed wi', &
    2814                                                   'th NetCDF output switched on'
    2815                    CALL MPI_ABORT( comm2d, 9999, ierr )
     2792                   message_string = 'maximum_number_of_tails ' // &
     2793                                    'needs to be increased ' // &
     2794                                    '&but this is not allowed wi' // &
     2795                                    'th NetCDF output switched on'
     2796                   CALL message( 'advec_particles', 'PA0147', 2, 2, 0, 6, 0 )
    28162797                ELSE
    28172798!    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trnpt'
     
    28582839          THEN
    28592840             IF ( netcdf_output )  THEN
    2860                 PRINT*, '+++ advec_particles:  maximum_number_of_particles ', &
    2861                                                'needs to be increased'
    2862                 PRINT*, '                      but this is not allowed with ', &
    2863                                                'NetCDF output switched on'
    2864                 CALL MPI_ABORT( comm2d, 9999, ierr )
     2841                message_string = 'maximum_number_of_particles ' // &
     2842                                 'needs to be increased ' // &
     2843                                 '&but this is not allowed with ' // &
     2844                                 'NetCDF output switched on'
     2845               CALL message( 'advec_particles', 'PA0146', 2, 2, 0, 6, 0 ) 
    28652846             ELSE
    28662847!    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trsp'
     
    28862867             THEN
    28872868                IF ( netcdf_output )  THEN
    2888                    PRINT*, '+++ advec_particles:  maximum_number_of_tails ', &
    2889                                                   'needs to be increased'
    2890                    PRINT*, '                      but this is not allowed wi', &
    2891                                                   'th NetCDF output switched on'
    2892                    CALL MPI_ABORT( comm2d, 9999, ierr )
     2869                   message_string = 'maximum_number_of_tails ' // &
     2870                                    'needs to be increased ' // &
     2871                                    '&but this is not allowed wi'// &
     2872                                    'th NetCDF output switched on'
     2873                   CALL message( 'advec_particles', 'PA0147', 2, 2, 0, 6, 0 )
    28932874                ELSE
    28942875!    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trspt'
     
    30913072               ((nyn-nys+2)*dy)/(particles(n)%age-particles(n)%age_m) )  THEN
    30923073
    3093              PRINT*, '+++ advec_particles: particle too fast.  n = ', n
    3094 #if defined( __parallel )
    3095              CALL MPI_ABORT( comm2d, 9999, ierr )
    3096 #else
    3097              CALL local_stop
    3098 #endif
     3074               WRITE( message_string, * )  'particle too fast.  n = ',  n
     3075               CALL message( 'advec_particles', 'PA0148', 2, 2, 0, 6, 0 )
    30993076          ENDIF
    31003077
     
    39083885       IF ( i < nxl .OR. i > nxr .OR. j < nys .OR. j > nyn .OR. k < nzb+1 .OR. &
    39093886            k > nzt )  THEN
    3910           PRINT*, '+++ sort_particles: particle out of range: i=', i, ' j=', &
    3911                                        j, ' k=', k
    3912           PRINT*, '                    nxl=', nxl, ' nxr=', nxr, &
    3913                                      ' nys=', nys, ' nyn=', nyn, &
    3914                                      ' nzb=', nzb, ' nzt=', nzt
     3887          WRITE( message_string, * ) ' particle out of range: i=', i, ' j=', &
     3888                          j, ' k=', k, &
     3889                          ' &nxl=', nxl, ' nxr=', nxr, &
     3890                          ' nys=', nys, ' nyn=', nyn, &
     3891                          ' nzb=', nzb, ' nzt=', nzt
     3892         CALL message( 'sort_particles', 'PA0149', 1, 2, 0, 6, 0 )
    39153893       ENDIF
    39163894
Note: See TracChangeset for help on using the changeset viewer.