Changeset 276


Ignore:
Timestamp:
Mar 29, 2009 8:50:26 AM (15 years ago)
Author:
raasch
Message:

bugfix and change concerning particle advection

Location:
palm/trunk/SOURCE
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r266 r276  
    4040user_parin, user_read_restart_data, user_spectra )
    4141
     42Maximum number of tails is calculated from maximum number of particles and
     43skip_particles_for_tail (init_particles)
     44
    4245First constant in array den also defined as type double. (eqn_state_seawater)
    4346
  • palm/trunk/SOURCE/advec_particles.f90

    r275 r276  
    322322                          ' ql_c=',ql_c(k,j,i), ' &part(',n,')%wf=', &
    323323                          particles(n)%weight_factor,' delta_r=',delta_r
    324              CALL message( 'advec_particles', 'PA0143', 2, 2, 0, 6, 1 )
     324             CALL message( 'advec_particles', 'PA0143', 2, 2, -1, 6, 1 )
    325325          ENDIF
    326326
     
    333333                          ' &d_radius=',d_radius,' delta_r=',delta_r,&
    334334                          ' particle_radius=',particles(n)%radius
    335              CALL message( 'advec_particles', 'PA0144', 2, 2, 0, 6, 1 )
     335             CALL message( 'advec_particles', 'PA0144', 2, 2, -1, 6, 1 )
    336336          ENDIF
    337337          particles(n)%radius = new_r
     
    426426                         WRITE( message_string, * )  'collision_efficiency ' , &
    427427                                   'out of range:' ,effective_coll_efficiency
    428                          CALL message( 'advec_particles', 'PA0145', 2, 2, 0,   &
     428                         CALL message( 'advec_particles', 'PA0145', 2, 2, -1,  &
    429429                                       6, 1 )
    430430                      END IF
     
    19251925                                 '&but this is not allowed with ' // &
    19261926                                 'NetCDF output switched on'
    1927                 CALL message( 'advec_particles', 'PA0146', 2, 2, 0, 6, 1 )
     1927                CALL message( 'advec_particles', 'PA0146', 2, 2, -1, 6, 1 )
    19281928             ELSE
    19291929!    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory dt_prel'
     
    19451945                                    '&but this is not allowed wi' // &
    19461946                                    'th NetCDF output switched on'
    1947                    CALL message( 'advec_particles', 'PA0147', 2, 2, 0, 6, 1 )
     1947                   CALL message( 'advec_particles', 'PA0147', 2, 2, -1, 6, 1 )
    19481948                ELSE
    19491949!    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory dt_prel'
     
    23302330                                  '&but this is not allowed with ' //  &
    23312331                                  'NetCDF output switched on'
    2332                 CALL message( 'advec_particles', 'PA0146', 2, 2, 0, 6, 1 )
     2332                CALL message( 'advec_particles', 'PA0146', 2, 2, -1, 6, 1 )
    23332333             ELSE
    23342334!    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trrp'
     
    23582358                                    '&but this is not allowed wi'// &
    23592359                                    'th NetCDF output switched on'
    2360                 CALL message( 'advec_particles', 'PA0147', 2, 2, 0, 6, 1 )
     2360                   CALL message( 'advec_particles', 'PA0147', 2, 2, -1, 6, 1 )
    23612361                ELSE
    23622362!    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trrpt'
     
    24072407                                 '&but this is not allowed with '// &
    24082408                                 'NetCDF output switched on'
    2409                 CALL message( 'advec_particles', 'PA0146', 2, 2, 0, 6, 1 )
     2409                CALL message( 'advec_particles', 'PA0146', 2, 2, -1, 6, 1 )
    24102410             ELSE
    24112411!    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trlp'
     
    24352435                                    '&but this is not allowed wi'// &
    24362436                                    'th NetCDF output switched on'
    2437                    CALL message( 'advec_particles', 'PA0147', 2, 2, 0, 6, 1 )
     2437                   CALL message( 'advec_particles', 'PA0147', 2, 2, -1, 6, 1 )
    24382438                ELSE
    24392439!    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trlpt'
     
    27712771                                 '&but this is not allowed with '// &
    27722772                                 'NetCDF output switched on'
    2773                 CALL message( 'advec_particles', 'PA0146', 2, 2, 0, 6, 1 )
     2773                CALL message( 'advec_particles', 'PA0146', 2, 2, -1, 6, 1 )
    27742774             ELSE
    27752775!    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trnp'
     
    27992799                                    '&but this is not allowed wi' // &
    28002800                                    'th NetCDF output switched on'
    2801                    CALL message( 'advec_particles', 'PA0147', 2, 2, 0, 6, 1 )
     2801                   CALL message( 'advec_particles', 'PA0147', 2, 2, -1, 6, 1 )
    28022802                ELSE
    28032803!    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trnpt'
     
    28142814                                trnpt_count_recv*tlength, MPI_REAL, pnorth, 1, &
    28152815                                comm2d, status, ierr )
     2816
    28162817!
    28172818!--          Update the tail ids for the transferred particles
     
    28482849                                 '&but this is not allowed with ' // &
    28492850                                 'NetCDF output switched on'
    2850                CALL message( 'advec_particles', 'PA0146', 2, 2, 0, 6, 1 ) 
     2851               CALL message( 'advec_particles', 'PA0146', 2, 2, -1, 6, 1 ) 
    28512852             ELSE
    28522853!    WRITE ( 9, * ) '*** advec_particles: before allocate_prt_memory trsp'
     
    28762877                                    '&but this is not allowed wi'// &
    28772878                                    'th NetCDF output switched on'
    2878                    CALL message( 'advec_particles', 'PA0147', 2, 2, 0, 6, 1 )
     2879                   CALL message( 'advec_particles', 'PA0147', 2, 2, -1, 6, 1 )
    28792880                ELSE
    28802881!    WRITE ( 9, * ) '*** advec_particles: before allocate_tail_memory trspt'
     
    30793080
    30803081                  WRITE( message_string, * )  'particle too fast.  n = ',  n
    3081                   CALL message( 'advec_particles', 'PA0148', 2, 2, 0, 6, 1 )
     3082                  CALL message( 'advec_particles', 'PA0148', 2, 2, -1, 6, 1 )
    30823083             ENDIF
    30833084          ENDIF
  • palm/trunk/SOURCE/init_particles.f90

    r274 r276  
    44! Current revisions:
    55! -----------------
    6 ! Output of messages replaced by message handling routine
     6! Maximum number of tails is calculated from maximum number of particles and
     7! skip_particles_for_tail,
     8! output of messages replaced by message handling routine
    79! Bugfix: arrays for tails are allocated with a minimum size of 10 tails if
    810! there is no tail initially
     
    442444       IF ( use_particle_tails )  THEN
    443445!
    444 !--       Choose the maximum number of tails significantly larger than the
    445 !--       one initially required
    446           factor = 10.0
    447           value  = number_of_tails
    448           DO WHILE ( value / 10.0 >= 1.0 )
    449              factor = factor * 10.0
    450              value  = value / 10.0
    451           ENDDO
    452           maximum_number_of_tails = factor * INT( value )
     446!--       Choose the maximum number of tails with respect to the maximum number
     447!--       of particles and skip_particles_for_tail
     448          maximum_number_of_tails = maximum_number_of_particles / &
     449                                    skip_particles_for_tail
     450
    453451!
    454452!--       Create a minimum number of tails in case that there is no tail
Note: See TracChangeset for help on using the changeset viewer.