Ignore:
Timestamp:
Mar 8, 2017 3:55:25 PM (5 years ago)
Author:
knoop
Message:

Bugfix: parallel random number generator

File:
1 edited

Legend:

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

    r2119 r2172  
    2020! Current revisions:
    2121! ------------------
    22 !
     22! Bugfix: moved parallel random generator initialization into its module
    2323!
    2424! Former revisions:
     
    370370   
    371371    USE random_generator_parallel,                                             &
    372         ONLY:  random_number_parallel, random_seed_parallel, random_dummy,     &
    373                id_random_array, seq_random_array
     372        ONLY:  init_parallel_random_generator
    374373   
    375374    USE statistics,                                                            &
     
    816815
    817816!
    818 !-- ID-array and state-space-array for the parallel random number generator
    819     IF ( random_generator == 'random-parallel' )  THEN
    820        ALLOCATE ( seq_random_array(5,nysg:nyng,nxlg:nxrg) )
    821        ALLOCATE ( id_random_array(0:ny,0:nx) )
    822        seq_random_array = 0
    823        id_random_array  = 0
    824     ENDIF
    825    
    826 !
    827817!-- 4D-array for storing the Rif-values at vertical walls
    828818    IF ( topography /= 'flat' )  THEN
     
    12871277       
    12881278       IF ( random_generator == 'random-parallel' )  THEN
    1289 !--       Asigning an ID to every vertical gridpoint column
    1290 !--       dependig on the ensemble run number.
    1291           random_dummy=1
    1292           DO j=0,ny
    1293              DO i=0,nx
    1294                 id_random_array(j,i) = random_dummy + 1E6                      &
    1295                                        * ( ensemble_member_nr - 1000 )
    1296                 random_dummy = random_dummy + 1
    1297              END DO
    1298           ENDDO
    1299 !--       Initializing with random_seed_parallel for every vertical
    1300 !--       gridpoint column.
    1301           random_dummy=0
    1302           DO j = nysg, nyng
    1303              DO i = nxlg, nxrg
    1304                 CALL random_seed_parallel (random_sequence=id_random_array(j, i))
    1305                 CALL random_number_parallel (random_dummy)
    1306                 CALL random_seed_parallel (get=seq_random_array(:, j, i))
    1307              END DO
    1308           ENDDO
     1279          CALL init_parallel_random_generator(nx, ny, nys, nyn, nxl, nxr)
    13091280       ENDIF
    13101281
Note: See TracChangeset for help on using the changeset viewer.