Changeset 559 for palm


Ignore:
Timestamp:
Sep 7, 2010 3:17:00 PM (14 years ago)
Author:
weinreis
Message:
 
Location:
palm/trunk/SOURCE
Files:
10 edited

Legend:

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

    r557 r559  
    37943794
    37953795    IMPLICIT NONE
    3796    
    3797     INTEGER :: rbs
    37983796
    37993797    CHARACTER (LEN=10) ::  particle_binary_version
     
    38163814    ENDIF
    38173815
    3818     DO rbs = 0, numprocs/binary_io_blocksize-1     
    3819        IF ( mod_numprocs_size == rbs ) THEN
    3820 !
    3821 !--       Write the version number of the binary format.
    3822 !--       Attention: After changes to the following output commands the version
    3823 !--       ---   number of the variable particle_binary_version must be changed!
     3816!
     3817!-- Write the version number of the binary format.
     3818!-- Attention: After changes to the following output commands the version
     3819!-- ---------  number of the variable particle_binary_version must be changed!
    38243820!--            Also, the version number and the list of arrays to be read in
    38253821!--            init_particles must be adjusted accordingly.
    3826           particle_binary_version = '3.0'
    3827           WRITE ( 90 )  particle_binary_version
    3828 
    3829 !
    3830 !--       Write some particle parameters, the size of the particle arrays
    3831 !--       as well as other dvrp-plot variables.
    3832           WRITE ( 90 )  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,              &
     3822    particle_binary_version = '3.0'
     3823    WRITE ( 90 )  particle_binary_version
     3824
     3825!
     3826!-- Write some particle parameters, the size of the particle arrays as well as
     3827!-- other dvrp-plot variables.
     3828    WRITE ( 90 )  bc_par_b, bc_par_lr, bc_par_ns, bc_par_t,                    &
    38333829                  maximum_number_of_particles, maximum_number_of_tailpoints,   &
    38343830                  maximum_number_of_tails, number_of_initial_particles,        &
     
    38373833                  time_write_particle_data, uniform_particles
    38383834
    3839           IF ( number_of_initial_particles /= 0 )    &
    3840              WRITE ( 90 )  initial_particles
    3841 
    3842           WRITE ( 90 )  prt_count, prt_start_index
    3843           WRITE ( 90 )  particles
    3844 
    3845           IF ( use_particle_tails )  THEN
    3846              WRITE ( 90 )  particle_tail_coordinates
    3847           ENDIF
    3848          
    3849        ENDIF 
    3850        CALL MPI_BARRIER(comm2d, ierr )   
    3851     ENDDO
     3835    IF ( number_of_initial_particles /= 0 )  WRITE ( 90 )  initial_particles
     3836
     3837    WRITE ( 90 )  prt_count, prt_start_index
     3838    WRITE ( 90 )  particles
     3839
     3840    IF ( use_particle_tails )  THEN
     3841       WRITE ( 90 )  particle_tail_coordinates
     3842    ENDIF
    38523843
    38533844    CLOSE ( 90 )
  • palm/trunk/SOURCE/data_output_2d.f90

    r557 r559  
    7777    CHARACTER (LEN=50) ::  rtext
    7878    INTEGER ::  av, ngp, file_id, i, if, is, iis, j, k, l, layer_xy, n, psi, &
    79                 rbs, s, sender, &
     79                s, sender, &
    8080                ind(4)
    8181    LOGICAL ::  found, resorted, two_d
     
    720720                         ENDIF
    721721#endif
    722                          DO rbs = 0, numprocs/binary_io_blocksize-1       
    723                             IF ( mod_numprocs_size == rbs ) THEN
    724                                WRITE ( 21 )  nxl-1, nxr+1, nys-1, nyn+1
    725                                WRITE ( 21 )  local_2d
    726                             ENDIF     
    727                             CALL MPI_BARRIER(comm2d, ierr )
    728                          ENDDO
    729                      
     722                         WRITE ( 21 )  nxl-1, nxr+1, nys-1, nyn+1
     723                         WRITE ( 21 )  local_2d
     724
    730725                      ELSE
    731726!
     
    10181013                         ENDIF
    10191014#endif
    1020                          DO rbs = 0, numprocs/binary_io_blocksize-1       
    1021                             IF ( mod_numprocs_size == rbs ) THEN
    1022                                IF ( ( section(is,s) >= nys  .AND.            &
    1023                                       section(is,s) <= nyn )  .OR.           &
    1024                                     ( section(is,s) == -1  .AND.             &
    1025                                       nys-1 == -1 ) )                        &
    1026                                THEN
    1027                                   WRITE (22)  nxl-1, nxr+1, nzb, nzt+1
    1028                                   WRITE (22)  local_2d
    1029                                ELSE
    1030                                   WRITE (22)  -1, -1, -1, -1
    1031                                ENDIF
    1032                             ENDIF     
    1033                             CALL MPI_BARRIER(comm2d, ierr )
    1034                          ENDDO
     1015                         IF ( ( section(is,s) >= nys  .AND.                  &
     1016                                section(is,s) <= nyn )  .OR.                 &
     1017                              ( section(is,s) == -1  .AND.  nys-1 == -1 ) )  &
     1018                         THEN
     1019                            WRITE (22)  nxl-1, nxr+1, nzb, nzt+1
     1020                            WRITE (22)  local_2d
     1021                         ELSE
     1022                            WRITE (22)  -1, -1, -1, -1
     1023                         ENDIF
    10351024
    10361025                      ELSE
     
    13231312                         ENDIF
    13241313#endif
    1325                          DO rbs = 0, numprocs/binary_io_blocksize-1       
    1326                             IF ( mod_numprocs_size == rbs ) THEN
    1327                                IF ( ( section(is,s) >= nxl  .AND.            &
    1328                                       section(is,s) <= nxr )  .OR.           &
    1329                                     ( section(is,s) == -1  .AND.             &
    1330                                       nxl-1 == -1 ) )                        &
    1331                                THEN
    1332                                   WRITE (23)  nys-1, nyn+1, nzb, nzt+1
    1333                                   WRITE (23)  local_2d
    1334                                ELSE
    1335                                   WRITE (23)  -1, -1, -1, -1
    1336                                ENDIF
    1337                             ENDIF     
    1338                             CALL MPI_BARRIER(comm2d, ierr )
    1339                          ENDDO
     1314                         IF ( ( section(is,s) >= nxl  .AND.                  &
     1315                                section(is,s) <= nxr )  .OR.                 &
     1316                              ( section(is,s) == -1  .AND.  nxl-1 == -1 ) )  &
     1317                         THEN
     1318                            WRITE (23)  nys-1, nyn+1, nzb, nzt+1
     1319                            WRITE (23)  local_2d
     1320                         ELSE
     1321                            WRITE (23)  -1, -1, -1, -1
     1322                         ENDIF
    13401323
    13411324                      ELSE
  • palm/trunk/SOURCE/data_output_3d.f90

    r557 r559  
    6060    CHARACTER (LEN=9) ::  simulated_time_mod
    6161
    62     INTEGER           ::  av, i, if, j, k, n, pos, prec, psi, rbs
     62    INTEGER           ::  av, i, if, j, k, n, pos, prec, psi
    6363
    6464    LOGICAL           ::  found, resorted
     
    382382!--       Compression, output of compression information on FLD-file and output
    383383!--       of compressed data.
    384           DO rbs = 0, numprocs/binary_io_blocksize-1     
    385              IF ( mod_numprocs_size == rbs ) THEN
    386                 CALL write_compressed( local_pf, 30, 33, myid, nxl, nxr, &
    387                                   nyn, nys, nzb, nz_do3d, prec )
    388              ENDIF
    389              CALL MPI_BARRIER(comm2d, ierr )
    390           ENDDO
    391                  
     384          CALL write_compressed( local_pf, 30, 33, myid, nxl, nxr, nyn, nys, &
     385                                 nzb, nz_do3d, prec )
    392386       ELSE
    393387!
     
    403397                   WRITE ( 30 )  simulated_time, do3d_time_count(av), av
    404398                ENDIF
    405                 DO rbs = 0, numprocs/binary_io_blocksize-1     
    406                    IF ( mod_numprocs_size == rbs ) THEN
    407                       WRITE ( 30 )  nxl-1, nxr+1, nys-1, nyn+1, nzb, nz_do3d
    408                       WRITE ( 30 )  local_pf
    409                    ENDIF
    410                    CALL MPI_BARRIER(comm2d, ierr )
    411                 ENDDO
    412                
     399                WRITE ( 30 )  nxl-1, nxr+1, nys-1, nyn+1, nzb, nz_do3d
     400                WRITE ( 30 )  local_pf
     401
    413402             ELSE
    414403!
  • palm/trunk/SOURCE/init_3d_model.f90

    r557 r559  
    113113    IMPLICIT NONE
    114114
    115     INTEGER ::  i, ind_array(1), j, k, rbs, sr
     115    INTEGER ::  i, ind_array(1), j, k, sr
    116116
    117117    INTEGER, DIMENSION(:), ALLOCATABLE ::  ngp_2dh_l
     
    969969!--    some of the global variables from restart file
    970970       IF ( TRIM( initializing_actions ) == 'cyclic_fill' )  THEN
     971
    971972          WRITE (9,*) 'before read_parts_of_var_list'
    972973          CALL local_flush( 9 )
    973           DO rbs = 0, numprocs/binary_io_blocksize-1     
    974              IF ( mod_numprocs_size == rbs ) THEN
    975                 CALL read_parts_of_var_list
    976              ENDIF
    977              CALL MPI_BARRIER(comm2d, ierr )
    978           ENDDO
     974          CALL read_parts_of_var_list
    979975          WRITE (9,*) 'after read_parts_of_var_list'
    980976          CALL local_flush( 9 )
     
    10601056!
    10611057!--    Read binary data from restart file
    1062        WRITE (9,*) 'before read_3d_binary'
    1063        CALL local_flush( 9 )
    1064        DO rbs = 0, numprocs/binary_io_blocksize-1       
    1065           IF ( mod_numprocs_size == rbs ) THEN 
    1066              CALL read_3d_binary
    1067           ENDIF     
    1068           CALL MPI_BARRIER(comm2d, ierr )
    1069        ENDDO 
    1070        WRITE (9,*) 'after read_3d_binary'
    1071        CALL local_flush( 9 )
     1058          WRITE (9,*) 'before read_3d_binary'
     1059          CALL local_flush( 9 )
     1060       CALL read_3d_binary
     1061          WRITE (9,*) 'after read_3d_binary'
     1062          CALL local_flush( 9 )
    10721063
    10731064!
     
    15821573#endif
    15831574
    1584     ngp_3d = INT ( ngp_2dh, KIND = SELECTED_INT_KIND( 18 ) ) * &
    1585              INT ( (nz + 2 ), KIND = SELECTED_INT_KIND( 18 ) )
     1575    ngp_3d = INT( ngp_2dh * ( nz + 2 ), KIND = SELECTED_INT_KIND( 18 ) )
    15861576
    15871577!
  • palm/trunk/SOURCE/init_grid.f90

    r557 r559  
    6363    INTEGER ::  bh, blx, bly, bxl, bxr, byn, bys, ch, cwx, cwy, cxl, cxr, cyn, &
    6464                cys, gls, i, inc, i_center, j, j_center, k, l, nxl_l, nxr_l, &
    65                 nyn_l, nys_l, nzb_si, nzt_l, rbs, vi
     65                nyn_l, nys_l, nzb_si, nzt_l, vi
    6666
    6767    INTEGER, DIMENSION(:), ALLOCATABLE   ::  vertical_influence
     
    460460          OPEN( 90, FILE='TOPOGRAPHY_DATA', STATUS='OLD', FORM='FORMATTED',  &
    461461               ERR=10 )
    462           DO rbs = 0, numprocs/binary_io_blocksize-1     
    463              IF ( mod_numprocs_size == rbs ) THEN
    464                 DO  j = ny, 0, -1
    465                    READ( 90, *, ERR=11, END=11 )  ( topo_height(j,i), i = 0, nx )
    466                 ENDDO
    467              ENDIF 
    468              CALL MPI_BARRIER(comm2d, ierr )     
    469           ENDDO
     462          DO  j = ny, 0, -1
     463             READ( 90, *, ERR=11, END=11 )  ( topo_height(j,i), i = 0, nx )
     464          ENDDO
    470465!
    471466!--       Calculate the index height of the topography
  • palm/trunk/SOURCE/modules.f90

    r557 r559  
    398398                vg_vertical_gradient_level_ind(10) = -9999, &
    399399                ws_vertical_gradient_level_ind(10) = -9999
    400                
    401     INTEGER :: binary_io_blocksize = -9999, mod_numprocs_size
    402400
    403401    INTEGER, DIMENSION(:), ALLOCATABLE ::  grid_level_count
  • palm/trunk/SOURCE/palm.f90

    r557 r559  
    7474    CHARACTER (LEN=9) ::  time_to_string
    7575    CHARACTER (LEN=1) ::  cdum
    76     INTEGER           ::  i, rbs, run_description_header_i(80)
     76    INTEGER           ::  i, run_description_header_i(80)
    7777
    7878    version = 'PALM 3.7a'
     
    174174!-- If required, write binary data for restart runs
    175175    IF ( write_binary(1:4) == 'true' )  THEN
    176        DO rbs = 0, numprocs/binary_io_blocksize-1     
    177           IF ( mod_numprocs_size == rbs ) THEN
    178 !
    179 !--          Write flow field data
    180              CALL write_3d_binary           
    181           ENDIF
    182           CALL MPI_BARRIER(comm2d, ierr )
    183        ENDDO         
     176!
     177!--    Write flow field data
     178       CALL write_3d_binary
    184179!
    185180!--    If required, write particle data
  • palm/trunk/SOURCE/parin.f90

    r557 r559  
    9898    IMPLICIT NONE
    9999
    100     INTEGER ::  idum, mod_blocksize, rbs
     100    INTEGER ::  idum
    101101
    102102
     
    104104                       bc_ns, bc_p_b, bc_p_t, bc_pt_b, bc_pt_t, bc_q_b, &
    105105             bc_q_t,bc_s_b, bc_s_t, bc_sa_t, bc_uv_b, bc_uv_t, &
    106              binary_io_blocksize, &
    107106             bottom_salinityflux, building_height, building_length_x, &
    108107             building_length_y, building_wall_left, building_wall_south, &
     
    209208 11 message_string = 'no \$inipar-namelist found'
    210209    CALL message( 'parin', 'PA0272', 1, 2, 0, 6, 0 )
    211    
    212 !
    213 !-- Check blocksize of binary IO
    214 12  mod_blocksize = MODULO(numprocs,binary_io_blocksize)
    215     IF ( mod_blocksize /= 0 ) THEN
    216        WRITE( message_string, * ) 'illegal value for binary_io_blocksize: &
    217                                   ', binary_io_blocksize, &
    218                                   ' - no binary IO block by block' 
    219        CALL message( 'check_parameters', 'PA0325', 0, 1, 0, 6, 0)
    220        binary_io_blocksize = numprocs
    221     ENDIF
    222     mod_numprocs_size = MOD(myid,numprocs/binary_io_blocksize)
    223    
     210
    224211!
    225212!-- If required, read control parameters from restart file (produced by
    226213!-- a prior run). All PEs are reading from file created by PE0 (see check_open)
    227     IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
    228    
    229        DO rbs = 0, numprocs/binary_io_blocksize-1
    230           IF ( mod_numprocs_size == rbs ) THEN
    231              CALL read_var_list
    232           ENDIF 
    233           CALL MPI_BARRIER(comm2d, ierr )   
    234        ENDDO
    235        
     214 12 IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
     215
     216       CALL read_var_list
    236217!
    237218!--    The restart file will be reopened when reading the subdomain data
  • palm/trunk/SOURCE/user_check_data_output_pr.f90

    r557 r559  
    5555!                                            ! defined (use zu or zw)
    5656
    57        CASE ( 'u*v*' )                      ! quantity string as given in
    58                                             ! data_output_pr_user
    59           index = pr_palm + 1
    60           dopr_index(var_count)  = index    ! quantities' user-profile-number
    61           dopr_unit(var_count)   = 'm2/s2'  ! quantity unit
    62           hom(:,2,index,:)       = SPREAD( zu, 2, statistic_regions+1 )
    63                                             ! grid on which the quantity is
    64                                             ! defined (use zu or zw)
    65                                            
    6657       CASE DEFAULT
    6758          unit = 'illegal'
  • palm/trunk/SOURCE/user_last_actions.f90

    r557 r559  
    2222
    2323    USE control_parameters
    24     USE pegrid
    2524    USE user
    2625
    2726    IMPLICIT NONE
    28    
    29     INTEGER :: rbs
    3027
    3128!
     
    3330!-- Sample for user-defined output:
    3431    IF ( write_binary(1:4) == 'true' )  THEN
    35        DO rbs = 0, numprocs/binary_io_blocksize-1       
    36           IF ( mod_numprocs_size == rbs ) THEN
    37          
    38 !            IF ( ALLOCATED( u2_av ) )  THEN
    39 !               WRITE ( 14 )  'u2_av               ';  WRITE ( 14 )  u2_av
    40 !            ENDIF
     32!       IF ( ALLOCATED( u2_av ) )  THEN
     33!          WRITE ( 14 )  'u2_av               ';  WRITE ( 14 )  u2_av
     34!       ENDIF
    4135
    42              WRITE ( 14 )  '*** end user ***    '
    43        
    44           ENDIF     
    45           CALL MPI_BARRIER(comm2d, ierr )
    46        ENDDO
     36       WRITE ( 14 )  '*** end user ***    '
    4737
    4838    ENDIF
Note: See TracChangeset for help on using the changeset viewer.