Changeset 1400 for palm/trunk/SOURCE
- Timestamp:
- May 9, 2014 2:03:54 PM (11 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r1381 r1400 20 20 # Current revisions: 21 21 # ------------------ 22 # 22 # Added new module random_generator_parallel 23 23 # 24 24 # Former revisions: … … 206 206 poismg.f90 prandtl_fluxes.f90 pres.f90 print_1d.f90 \ 207 207 production_e.f90 prognostic_equations.f90 random_function.f90 \ 208 random_gauss.f90 read_3d_binary.f90 read_var_list.f90 run_control.f90 \ 208 random_gauss.f90 random_generator_parallel.f90 read_3d_binary.f90 \ 209 read_var_list.f90 run_control.f90 \ 209 210 set_slicer_attributes_dvrp.f90 singleton.f90 sor.f90 \ 210 211 subsidence.f90 sum_up_3d_data.f90 \ … … 297 298 diffusion_w.o: modules.o mod_kinds.o wall_fluxes.o 298 299 diffusivities.o: modules.o mod_kinds.o 299 disturb_field.o: modules.o cpulog.o mod_kinds.o random_function.o 300 disturb_field.o: modules.o cpulog.o mod_kinds.o random_function.o random_generator_parallel.o 300 301 disturb_heatflux.o: modules.o cpulog.o mod_kinds.o 301 302 eqn_state_seawater.o: modules.o mod_kinds.o … … 310 311 init_1d_model.o: modules.o mod_kinds.o 311 312 init_3d_model.o: modules.o cpulog.o mod_kinds.o random_function.o advec_ws.o \ 312 ls_forcing.o lpm_init.o 313 ls_forcing.o lpm_init.o random_generator_parallel.o 313 314 init_advec.o: modules.o mod_kinds.o 314 315 init_cloud_physics.o: modules.o mod_kinds.o … … 348 349 lpm_init.o: modules.o lpm_collision_kernels.o mod_kinds.o \ 349 350 random_function.o mod_particle_attributes.o lpm_exchange_horiz.o \ 350 lpm_pack_arrays.o 351 lpm_pack_arrays.o random_generator_parallel.o 351 352 lpm_init_sgs_tke.o: modules.o mod_kinds.o mod_particle_attributes.o 352 353 lpm_pack_arrays.o: modules.o cpulog.o mod_kinds.o mod_particle_attributes.o … … 354 355 lpm_pack_arrays.o 355 356 lpm_release_set.o: modules.o mod_kinds.o random_function.o \ 356 mod_particle_attributes.o lpm_init.o 357 mod_particle_attributes.o lpm_init.o random_generator_parallel.o 357 358 lpm_set_attributes.o: modules.o cpulog.o mod_kinds.o mod_particle_attributes.o 358 359 lpm_write_exchange_statistics.o: modules.o mod_kinds.o mod_particle_attributes.o … … 383 384 nudging.o plant_canopy_model.o production_e.o subsidence.o user_actions.o 384 385 random_function.o: mod_kinds.o 385 random_gauss.o: mod_kinds.o random_function.o 386 read_3d_binary.o: modules.o cpulog.o mod_kinds.o random_function.o 386 random_gauss.o: mod_kinds.o random_function.o random_generator_parallel.o 387 random_generator_parallel.o: mod_kinds.o 388 read_3d_binary.o: modules.o cpulog.o mod_kinds.o random_function.o random_generator_parallel.o 387 389 read_var_list.o: modules.o mod_kinds.o 388 390 run_control.o: modules.o cpulog.o mod_kinds.o … … 430 432 user_statistics.o: modules.o mod_kinds.o user_module.o 431 433 wall_fluxes.o: modules.o mod_kinds.o 432 write_3d_binary.o: modules.o cpulog.o mod_kinds.o random_function.o 434 write_3d_binary.o: modules.o cpulog.o mod_kinds.o random_function.o random_generator_parallel.o 433 435 write_var_list.o: modules.o mod_kinds.o -
palm/trunk/SOURCE/check_parameters.f90
r1385 r1400 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Check random generator extended by option random-parallel 23 23 ! 24 24 ! Former revisions: … … 3485 3485 ! 3486 3486 !-- Check random generator 3487 IF ( random_generator /= 'system-specific' .AND. & 3488 random_generator /= 'numerical-recipes' ) THEN 3487 IF ( (random_generator /= 'system-specific' .AND. & 3488 random_generator /= 'random-parallel' ) .AND. & 3489 random_generator /= 'numerical-recipes' ) THEN 3489 3490 message_string = 'unknown random generator: random_generator = "' // & 3490 3491 TRIM( random_generator ) // '"' -
palm/trunk/SOURCE/disturb_field.f90
r1354 r1400 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! Parallel random number generator added 23 23 ! 24 24 ! Former revisions: … … 72 72 USE random_function_mod, & 73 73 ONLY: random_function 74 75 USE random_generator_parallel, & 76 ONLY: random_number_parallel, random_seed_parallel, random_dummy, & 77 id_random_array, seq_random_array 74 78 75 79 IMPLICIT NONE … … 112 116 ENDIF 113 117 ENDDO 118 ENDDO 119 ENDDO 120 ELSEIF ( random_generator == 'random-parallel' ) THEN 121 DO i = dist_nxl(dist_range), dist_nxr(dist_range) 122 DO j = dist_nys(dist_range), dist_nyn(dist_range) 123 CALL random_seed_parallel( put=seq_random_array(:, j, i) ) 124 DO k = disturbance_level_ind_b, disturbance_level_ind_t 125 CALL random_number_parallel( random_dummy ) 126 randomnumber = 3.0_wp * disturbance_amplitude * & 127 ( random_dummy - 0.5_wp ) 128 IF ( nxl <= i .AND. nxr >= i .AND. nys <= j .AND. & 129 nyn >= j ) & 130 THEN 131 dist1(k,j,i) = randomnumber 132 ENDIF 133 ENDDO 134 ! IF (myid == 0) PRINT*, nxl, i, nxr, i, nys, j, nyn, j 135 CALL random_seed_parallel( get=seq_random_array(:, j, i) ) 114 136 ENDDO 115 137 ENDDO -
palm/trunk/SOURCE/init_3d_model.f90
r1385 r1400 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! Parallel random number generator added 23 23 ! 24 24 ! Former revisions: … … 198 198 199 199 USE random_function_mod 200 201 USE random_generator_parallel, & 202 ONLY: random_number_parallel, random_seed_parallel, random_dummy, & 203 id_random_array, seq_random_array 200 204 201 205 USE statistics, & … … 481 485 482 486 ! 487 !-- ID-array and state-space-array for the parallel random number generator 488 IF ( random_generator == 'random-parallel' ) THEN 489 ALLOCATE ( seq_random_array(5,nysg:nyng,nxlg:nxrg) ) 490 ALLOCATE ( id_random_array(0:ny,0:nx) ) 491 seq_random_array = 0 492 id_random_array = 0 493 ENDIF 494 495 ! 483 496 !-- 3D-arrays for the leaf area density and the canopy drag coefficient 484 497 IF ( plant_canopy ) THEN … … 913 926 914 927 ! 928 !-- Initialize the random number generators (from numerical recipes) 929 CALL random_function_ini 930 IF ( random_generator == 'random-parallel' ) THEN 931 CALL random_function_ini 932 !- asigning an ID to every vertical gridpoint column 933 DO j=0,ny 934 DO i=0,nx 935 id_random_array(j,i) = 1000000*i + j 936 END DO 937 ENDDO 938 !- executing the initial ran_parallel 939 DO j = nysg, nyng 940 DO i = nxlg, nxrg 941 CALL random_seed_parallel (random_sequence=id_random_array(j, i)) 942 CALL random_number_parallel (random_dummy) 943 CALL random_seed_parallel (get=seq_random_array(:, j, i)) 944 END DO 945 ENDDO 946 ENDIF 947 948 ! 915 949 !-- Initialize fluxes at bottom surface 916 950 IF ( use_surface_fluxes ) THEN … … 1098 1132 q(nzb,:,:) = q(nzb,:,:) + q_surface_initial_change 1099 1133 ENDIF 1100 !1101 !-- Initialize the random number generator (from numerical recipes)1102 CALL random_function_ini1103 1134 1104 1135 ! -
palm/trunk/SOURCE/read_3d_binary.f90
r1359 r1400 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! reading of arrays for random_generator_parallel added 23 23 ! 24 24 ! Former revisions: … … 95 95 USE random_function_mod, & 96 96 ONLY: random_iv, random_iy 97 98 USE random_generator_parallel, & 99 ONLY: id_random_array, seq_random_array 97 100 98 101 USE statistics, & … … 681 684 IF ( k == 1 ) READ ( 13 ) random_iv 682 685 IF ( k == 1 ) READ ( 13 ) random_iy 686 687 CASE ( 'seq_random_array' ) ! still unresolved issue 688 IF ( k == 1 ) READ ( 13 ) id_random_array 689 IF ( k == 1 ) READ ( 13 ) seq_random_array 683 690 684 691 CASE ( 'rho_av' ) -
palm/trunk/SOURCE/write_3d_binary.f90
r1360 r1400 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! writing of arrays for random_generator_parallel added 23 23 ! 24 24 ! Former revisions: … … 91 91 USE random_function_mod, & 92 92 ONLY: random_iv, random_iy 93 94 USE random_generator_parallel, & 95 ONLY: id_random_array, seq_random_array 93 96 94 97 USE statistics, & … … 223 226 WRITE ( 14 ) 'random_iv '; WRITE ( 14 ) random_iv 224 227 WRITE ( 14 ) random_iy 228 IF ( ALLOCATED( seq_random_array ) ) THEN 229 WRITE ( 14 ) 'seq_random_array '; WRITE ( 14 ) id_random_array 230 WRITE ( 14 ) seq_random_array 231 ENDIF 225 232 WRITE ( 14 ) 'rif '; WRITE ( 14 ) rif 226 233 IF ( topography /= 'flat' ) THEN
Note: See TracChangeset
for help on using the changeset viewer.