Changeset 1171 for palm/trunk/SOURCE
- Timestamp:
- May 30, 2013 11:27:45 AM (12 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/buoyancy.f90
r1154 r1171 20 20 ! Currrent revisions: 21 21 ! ----------------- 22 ! 22 ! openacc statements added to use_reference-case in accelerator version 23 23 ! 24 24 ! Former revisions: … … 225 225 !-- Normal case: horizontal surface 226 226 IF ( use_reference ) THEN 227 !$acc kernels present( nzb_s_inner, hom, tend, var ) 228 !$acc loop 227 229 DO i = i_left, i_right 228 230 DO j = j_south, j_north 231 !$acc loop independent vector(32) 229 232 DO k = nzb_s_inner(j,i)+1, nzt-1 230 233 tend(k,j,i) = tend(k,j,i) + atmos_ocean_sign * g * 0.5 * & … … 236 239 ENDDO 237 240 ENDDO 241 !$acc end kernels 238 242 ELSE 239 243 !$acc kernels present( nzb_s_inner, hom, tend, var ) -
palm/trunk/SOURCE/diffusion_e.f90
r1132 r1171 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! use_reference-case activated in accelerator version 23 23 ! 24 24 ! Former revisions: … … 317 317 !-- runtime errors occur with -C hopt on NEC 318 318 IF ( use_reference ) THEN 319 STOP '+++ use_reference not implemented in diffusion_e_acc' 320 ! DO i = nxl, nxr 321 ! DO j = nys, nyn 322 ! DO k = nzb_s_inner(j,i)+1, nzt 323 ! 324 !-- Calculate the mixing length (for dissipation) 325 ! dvar_dz = atmos_ocean_sign * & 326 ! ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k) 327 ! IF ( dvar_dz > 0.0 ) THEN 328 ! l_stable = 0.76 * SQRT( e(k,j,i) ) / & 329 ! SQRT( g / var_reference * dvar_dz ) + 1E-5 330 ! ELSE 331 ! l_stable = l_grid(k) 332 ! ENDIF 333 ! 334 !-- Adjustment of the mixing length 335 ! IF ( wall_adjustment ) THEN 336 ! l(k,j) = MIN( wall_adjustment_factor * & 337 ! ( zu(k) - zw(nzb_s_inner(j,i)) ), & 338 ! l_grid(k), l_stable ) 339 ! ll(k,j) = MIN( wall_adjustment_factor * & 340 ! ( zu(k) - zw(nzb_s_inner(j,i)) ), & 341 ! l_grid(k) ) 342 ! ELSE 343 ! l(k,j) = MIN( l_grid(k), l_stable ) 344 ! ll(k,j) = l_grid(k) 345 ! ENDIF 346 ! 347 ! ENDDO 348 ! ENDDO 349 ! 350 ! 351 !-- Calculate the tendency terms 352 ! DO j = nys, nyn 353 ! DO k = nzb_s_inner(j,i)+1, nzt 354 ! 355 ! dissipation(k,j) = ( 0.19 + 0.74 * l(k,j) / ll(k,j) ) * & 356 ! e(k,j,i) * SQRT( e(k,j,i) ) / l(k,j) 357 ! 358 ! tend(k,j,i) = tend(k,j,i) & 359 ! + ( & 360 ! ( km(k,j,i)+km(k,j,i+1) ) * ( e(k,j,i+1)-e(k,j,i) ) & 361 ! - ( km(k,j,i)+km(k,j,i-1) ) * ( e(k,j,i)-e(k,j,i-1) ) & 362 ! ) * ddx2 & 363 ! + ( & 364 ! ( km(k,j,i)+km(k,j+1,i) ) * ( e(k,j+1,i)-e(k,j,i) ) & 365 ! - ( km(k,j,i)+km(k,j-1,i) ) * ( e(k,j,i)-e(k,j-1,i) ) & 366 ! ) * ddy2 & 367 ! + ( & 368 ! ( km(k,j,i)+km(k+1,j,i) ) * ( e(k+1,j,i)-e(k,j,i) ) * ddzu(k+1) & 369 ! - ( km(k,j,i)+km(k-1,j,i) ) * ( e(k,j,i)-e(k-1,j,i) ) * ddzu(k) & 370 ! ) * ddzw(k) & 371 ! - dissipation(k,j) 372 ! 373 ! ENDDO 374 ! ENDDO 375 ! 376 ! 377 !-- Store dissipation if needed for calculating the sgs particle 378 !-- velocities 379 ! IF ( use_sgs_for_particles .OR. wang_kernel ) THEN 380 ! DO j = nys, nyn 381 ! DO k = nzb_s_inner(j,i)+1, nzt 382 ! diss(k,j,i) = dissipation(k,j) 383 ! ENDDO 384 ! ENDDO 385 ! ENDIF 386 ! 387 ! ENDDO 388 ! 319 320 !$acc kernels present( ddzu, ddzw, dd2zu, diss, e, km, l_grid ) & 321 !$acc present( nzb_s_inner, rif, tend, var, zu, zw ) 322 !$acc loop 323 DO i = i_left, i_right 324 DO j = j_south, j_north 325 !$acc loop vector( 32 ) 326 DO k = 1, nzt 327 328 IF ( k > nzb_s_inner(j,i) ) THEN 329 ! 330 !-- Calculate the mixing length (for dissipation) 331 dvar_dz = atmos_ocean_sign * & 332 ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k) 333 IF ( dvar_dz > 0.0 ) THEN 334 l_stable = 0.76 * SQRT( e(k,j,i) ) / & 335 SQRT( g / var_reference * dvar_dz ) + 1E-5 336 ELSE 337 l_stable = l_grid(k) 338 ENDIF 339 ! 340 !-- Adjustment of the mixing length 341 IF ( wall_adjustment ) THEN 342 l = MIN( wall_adjustment_factor * & 343 ( zu(k) - zw(nzb_s_inner(j,i)) ), & 344 l_grid(k), l_stable ) 345 ll = MIN( wall_adjustment_factor * & 346 ( zu(k) - zw(nzb_s_inner(j,i)) ), & 347 l_grid(k) ) 348 ELSE 349 l = MIN( l_grid(k), l_stable ) 350 ll = l_grid(k) 351 ENDIF 352 ! 353 !-- Calculate the tendency terms 354 dissipation = ( 0.19 + 0.74 * l / ll ) * & 355 e(k,j,i) * SQRT( e(k,j,i) ) / l 356 357 tend(k,j,i) = tend(k,j,i) & 358 + ( & 359 ( km(k,j,i)+km(k,j,i+1) ) * ( e(k,j,i+1)-e(k,j,i) ) & 360 - ( km(k,j,i)+km(k,j,i-1) ) * ( e(k,j,i)-e(k,j,i-1) ) & 361 ) * ddx2 & 362 + ( & 363 ( km(k,j,i)+km(k,j+1,i) ) * ( e(k,j+1,i)-e(k,j,i) ) & 364 - ( km(k,j,i)+km(k,j-1,i) ) * ( e(k,j,i)-e(k,j-1,i) ) & 365 ) * ddy2 & 366 + ( & 367 ( km(k,j,i)+km(k+1,j,i) ) * ( e(k+1,j,i)-e(k,j,i) ) * ddzu(k+1) & 368 - ( km(k,j,i)+km(k-1,j,i) ) * ( e(k,j,i)-e(k-1,j,i) ) * ddzu(k) & 369 ) * ddzw(k) & 370 - dissipation 371 372 ! 373 !-- Store dissipation if needed for calculating the sgs particle 374 !-- velocities 375 IF ( use_sgs_for_particles .OR. wang_kernel .OR. & 376 turbulence ) THEN 377 diss(k,j,i) = dissipation 378 ENDIF 379 380 ENDIF 381 382 ENDDO 383 ENDDO 384 ENDDO 385 !$acc end kernels 386 389 387 ELSE 390 388 … … 439 437 - ( km(k,j,i)+km(k-1,j,i) ) * ( e(k,j,i)-e(k-1,j,i) ) * ddzu(k) & 440 438 ) * ddzw(k) & 441 - dissipation439 - dissipation 442 440 443 441 ! -
palm/trunk/SOURCE/init_3d_model.f90
r1160 r1171 23 23 ! Current revisions: 24 24 ! ------------------ 25 ! 25 ! diss array is allocated with full size if accelerator boards are used 26 26 ! 27 27 ! Former revisions: … … 34 34 ! 1153 2013-05-10 14:33:08Z raasch 35 35 ! diss array is allocated with dummy elements even if it is not needed 36 ! (required by PGI 1 2.3/ CUDA 5.0)36 ! (required by PGI 13.4 / CUDA 5.0) 37 37 ! 38 38 ! 1115 2013-03-26 18:16:16Z hoffmann … … 507 507 !-- 3D-array for storing the dissipation, needed for calculating the sgs 508 508 !-- particle velocities 509 IF ( use_sgs_for_particles .OR. wang_kernel .OR. turbulence ) THEN 509 IF ( use_sgs_for_particles .OR. wang_kernel .OR. turbulence .OR. & 510 num_acc_per_node > 0 ) THEN 511 print*, '*** allocating diss' 510 512 ALLOCATE( diss(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 511 ELSE512 ALLOCATE( diss(2,2,2) )513 513 ENDIF 514 514 -
palm/trunk/SOURCE/time_integration.f90
r1132 r1171 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! split of prognostic_equations deactivated (comment lines) 23 23 ! 24 24 ! Former revisions: … … 245 245 CALL prognostic_equations_vector 246 246 ELSEIF ( loop_optimization == 'acc' ) THEN 247 ! i_left = nxl; i_right = nxr 247 i_left = nxl; i_right = nxr 248 j_south = nys; j_north = nyn 249 CALL prognostic_equations_acc 250 251 ! i_left = nxl; i_right = nxl+nbgp-1 248 252 ! j_south = nys; j_north = nyn 249 253 ! CALL prognostic_equations_acc 250 251 i_left = nxl; i_right = nxl+nbgp-1 252 j_south = nys; j_north = nyn 253 CALL prognostic_equations_acc 254 i_left = nxr-nbgp+1; i_right = nxr 255 j_south = nys; j_north = nyn 256 CALL prognostic_equations_acc 254 ! i_left = nxr-nbgp+1; i_right = nxr 255 ! j_south = nys; j_north = nyn 256 ! CALL prognostic_equations_acc 257 257 258 258 ! … … 310 310 ENDIF 311 311 312 i_left = nxl+nbgp; i_right = nxr-nbgp313 j_south = nys; j_north = nys+nbgp-1314 CALL prognostic_equations_acc315 i_left = nxl+nbgp; i_right = nxr-nbgp316 j_south = nyn-nbgp+1; j_north = nyn317 CALL prognostic_equations_acc312 ! i_left = nxl+nbgp; i_right = nxr-nbgp 313 ! j_south = nys; j_north = nys+nbgp-1 314 ! CALL prognostic_equations_acc 315 ! i_left = nxl+nbgp; i_right = nxr-nbgp 316 ! j_south = nyn-nbgp+1; j_north = nyn 317 ! CALL prognostic_equations_acc 318 318 319 319 IF ( background_communication ) THEN … … 374 374 ENDIF 375 375 376 i_left = nxl+nbgp; i_right = nxr-nbgp377 j_south = nys+nbgp; j_north = nyn-nbgp378 CALL prognostic_equations_acc376 ! i_left = nxl+nbgp; i_right = nxr-nbgp 377 ! j_south = nys+nbgp; j_north = nyn-nbgp 378 ! CALL prognostic_equations_acc 379 379 380 380 IF ( background_communication ) THEN
Note: See TracChangeset
for help on using the changeset viewer.