Changeset 1400 for palm/trunk/SOURCE/init_3d_model.f90
- Timestamp:
- May 9, 2014 2:03:54 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 !
Note: See TracChangeset
for help on using the changeset viewer.