Changeset 246 for palm/trunk/SOURCE/data_output_dvrp.f90
 Timestamp:
 Feb 27, 2009 11:42:39 AM (15 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/data_output_dvrp.f90
r242 r246 74 74 USE cloud_parameters 75 75 USE constants 76 USE control_parameters 76 77 USE cpulog 77 78 USE DVRP … … 83 84 USE particle_attributes 84 85 USE pegrid 85 USE control_parameters86 86 87 87 IMPLICIT NONE … … 165 165 ! If clipping is active and if this subdomain is clipped, find out the 166 166 ! number of particles and tails to be plotted; otherwise, all 167 ! particles/tails are plotted 167 ! particles/tails are plotted. dvrp_mask is used to mark the partikles. 168 168 IF ( .NOT. use_particle_tails ) THEN 169 169 ALLOCATE( dvrp_mask(number_of_particles) ) … … 299 299 ! 300 300 ! Create an intermediate array, properly dimensioned for plotoutput 301 ALLOCATE( local_pf(nxl:nxr+1,nys:nyn+1,nzb:nz_do3d) ) 301 ALLOCATE( local_pf(nxl_dvrp:nxr_dvrp+1,nys_dvrp:nyn_dvrp+1, & 302 nzb:nz_do3d) ) 302 303 303 304 ! 304 305 ! Move original array to intermediate array 305 SELECT CASE ( output_variable ) 306 307 CASE ( 'u', 'u_xy', 'u_xz', 'u_yz' ) 308 DO i = nxl, nxr+1 309 DO j = nys, nyn+1 310 DO k = nzb, nz_do3d 311 local_pf(i,j,k) = u(k,j,i) 312 ENDDO 313 ENDDO 314 ENDDO 315 ! 316 ! Replace mirrored values at lower surface by real surface values 317 IF ( output_variable == 'u_xz' .OR. & 318 output_variable == 'u_yz' ) THEN 319 IF ( ibc_uv_b == 0 ) local_pf(:,:,nzb) = 0.0 320 ENDIF 321 322 323 CASE ( 'v', 'v_xy', 'v_xz', 'v_yz' ) 324 DO i = nxl, nxr+1 325 DO j = nys, nyn+1 326 DO k = nzb, nz_do3d 327 local_pf(i,j,k) = v(k,j,i) 328 ENDDO 329 ENDDO 330 ENDDO 331 ! 332 ! Replace mirrored values at lower surface by real surface values 333 IF ( output_variable == 'v_xz' .OR. & 334 output_variable == 'v_yz' ) THEN 335 IF ( ibc_uv_b == 0 ) local_pf(:,:,nzb) = 0.0 336 ENDIF 337 338 CASE ( 'w', 'w_xy', 'w_xz', 'w_yz' ) 339 DO i = nxl, nxr+1 340 DO j = nys, nyn+1 341 DO k = nzb, nz_do3d 342 local_pf(i,j,k) = w(k,j,i) 343 ENDDO 344 ENDDO 345 ENDDO 306 IF ( dvrp_overlap ) THEN 307 308 SELECT CASE ( output_variable ) 309 310 CASE ( 'u', 'u_xy', 'u_xz', 'u_yz' ) 311 DO i = nxl_dvrp, nxr_dvrp+1 312 DO j = nys_dvrp, nyn_dvrp+1 313 DO k = nzb, nz_do3d 314 local_pf(i,j,k) = u(k,j,i) 315 ENDDO 316 ENDDO 317 ENDDO 318 ! 319 ! Replace mirrored values at lower surface by real surface 320 ! values 321 IF ( output_variable == 'u_xz' .OR. & 322 output_variable == 'u_yz' ) THEN 323 IF ( ibc_uv_b == 0 ) local_pf(:,:,nzb) = 0.0 324 ENDIF 325 326 327 CASE ( 'v', 'v_xy', 'v_xz', 'v_yz' ) 328 DO i = nxl_dvrp, nxr_dvrp+1 329 DO j = nys_dvrp, nyn_dvrp+1 330 DO k = nzb, nz_do3d 331 local_pf(i,j,k) = v(k,j,i) 332 ENDDO 333 ENDDO 334 ENDDO 335 ! 336 ! Replace mirrored values at lower surface by real surface 337 ! values 338 IF ( output_variable == 'v_xz' .OR. & 339 output_variable == 'v_yz' ) THEN 340 IF ( ibc_uv_b == 0 ) local_pf(:,:,nzb) = 0.0 341 ENDIF 342 343 CASE ( 'w', 'w_xy', 'w_xz', 'w_yz' ) 344 DO i = nxl_dvrp, nxr_dvrp+1 345 DO j = nys_dvrp, nyn_dvrp+1 346 DO k = nzb, nz_do3d 347 local_pf(i,j,k) = w(k,j,i) 348 ENDDO 349 ENDDO 350 ENDDO 346 351 ! Averaging for Langmuir circulation 347 ! DO k = nzb, nz_do3d 348 ! DO j = nys+1, nyn 349 ! DO i = nxl, nxr+1 350 ! local_pf(i,j,k) = 0.25 * local_pf(i,j1,k) + & 351 ! 0.50 * local_pf(i,j,k) + & 352 ! 0.25 * local_pf(i,j+1,k) 352 ! DO k = nzb, nz_do3d 353 ! DO j = nys_dvrp+1, nyn_dvrp 354 ! DO i = nxl_dvrp, nxr_dvrp+1 355 ! local_pf(i,j,k) = 0.25 * local_pf(i,j1,k) + & 356 ! 0.50 * local_pf(i,j,k) + & 357 ! 0.25 * local_pf(i,j+1,k) 358 ! ENDDO 353 359 ! ENDDO 354 360 ! ENDDO 355 ! ENDDO 356 357 CASE ( 'p', 'p_xy', 'p_xz', 'p_yz' ) 358 DO i = nxl, nxr+1 359 DO j = nys, nyn+1 360 DO k = nzb, nz_do3d 361 local_pf(i,j,k) = p(k,j,i) 362 ENDDO 363 ENDDO 364 ENDDO 365 366 CASE ( 'pt', 'pt_xy', 'pt_xz', 'pt_yz' ) 367 IF ( .NOT. cloud_physics ) THEN 368 DO i = nxl, nxr+1 369 DO j = nys, nyn+1 361 362 CASE ( 'p', 'p_xy', 'p_xz', 'p_yz' ) 363 DO i = nxl_dvrp, nxr_dvrp+1 364 DO j = nys_dvrp, nyn_dvrp+1 370 365 DO k = nzb, nz_do3d 371 local_pf(i,j,k) = pt(k,j,i) 372 ENDDO 373 ENDDO 374 ENDDO 375 ELSE 376 DO i = nxl, nxr+1 377 DO j = nys, nyn+1 378 DO k = nzb, nz_do3d 379 local_pf(i,j,k) = pt(k,j,i) + l_d_cp * pt_d_t(k) * & 380 ql(k,j,i) 381 ENDDO 382 ENDDO 383 ENDDO 384 ENDIF 385 386 CASE ( 'q', 'q_xy', 'q_xz', 'q_yz' ) 387 IF ( humidity .OR. passive_scalar ) THEN 388 DO i = nxl, nxr+1 389 DO j = nys, nyn+1 390 DO k = nzb, nz_do3d 391 local_pf(i,j,k) = q(k,j,i) 392 ENDDO 393 ENDDO 394 ENDDO 395 ELSE 396 IF ( myid == 0 ) THEN 397 PRINT*, '+++ data_output_dvrp: if humidity/passive_scalar = ', & 398 'FALSE output of ', output_variable, & 399 'is not provided' 366 local_pf(i,j,k) = p(k,j,i) 367 ENDDO 368 ENDDO 369 ENDDO 370 371 CASE ( 'pt', 'pt_xy', 'pt_xz', 'pt_yz' ) 372 IF ( .NOT. cloud_physics ) THEN 373 DO i = nxl_dvrp, nxr_dvrp+1 374 DO j = nys_dvrp, nyn_dvrp+1 375 DO k = nzb, nz_do3d 376 local_pf(i,j,k) = pt(k,j,i) 377 ENDDO 378 ENDDO 379 ENDDO 380 ELSE 381 DO i = nxl_dvrp, nxr_dvrp+1 382 DO j = nys_dvrp, nyn_dvrp+1 383 DO k = nzb, nz_do3d 384 local_pf(i,j,k) = pt(k,j,i) + l_d_cp * & 385 pt_d_t(k) * ql(k,j,i) 386 ENDDO 387 ENDDO 388 ENDDO 400 389 ENDIF 401 ENDIF 390 391 CASE ( 'q', 'q_xy', 'q_xz', 'q_yz' ) 392 IF ( humidity .OR. passive_scalar ) THEN 393 DO i = nxl_dvrp, nxr_dvrp+1 394 DO j = nys_dvrp, nyn_dvrp+1 395 DO k = nzb, nz_do3d 396 local_pf(i,j,k) = q(k,j,i) 397 ENDDO 398 ENDDO 399 ENDDO 400 ELSE 401 IF ( myid == 0 ) THEN 402 PRINT*, '+++ data_output_dvrp: if humidity/passive_scalar = ', & 403 'FALSE output of ', output_variable, & 404 'is not provided' 405 ENDIF 406 ENDIF 402 407 403 CASE ( 'ql', 'ql_xy', 'ql_xz', 'ql_yz' ) 404 IF ( cloud_physics .OR. cloud_droplets ) THEN 405 DO i = nxl, nxr+1 406 DO j = nys, nyn+1 407 DO k = nzb, nz_do3d 408 local_pf(i,j,k) = ql(k,j,i) 409 ENDDO 410 ENDDO 411 ENDDO 412 ELSE 413 IF ( myid == 0 ) THEN 414 PRINT*, '+++ data_output_dvrp: if cloud_physics = FALSE ', & 415 'output of ', output_variable, 'is not provided' 408 CASE ( 'ql', 'ql_xy', 'ql_xz', 'ql_yz' ) 409 IF ( cloud_physics .OR. cloud_droplets ) THEN 410 DO i = nxl_dvrp, nxr_dvrp+1 411 DO j = nys_dvrp, nyn_dvrp+1 412 DO k = nzb, nz_do3d 413 local_pf(i,j,k) = ql(k,j,i) 414 ENDDO 415 ENDDO 416 ENDDO 417 ELSE 418 IF ( myid == 0 ) THEN 419 PRINT*, '+++ data_output_dvrp: if cloud_physics = FALSE ', & 420 'output of ', output_variable, 'is not provided' 421 ENDIF 416 422 ENDIF 417 ENDIF 418 419 CASE ( 'u*_xy' ) 420 DO i = nxl, nxr+1 421 DO j = nys, nyn+1 422 local_pf(i,j,nzb+1) = us(j,i) 423 ENDDO 424 ENDDO 425 slicer_position = zu(nzb+1) 426 427 CASE ( 't*_xy' ) 428 DO i = nxl, nxr+1 429 DO j = nys, nyn+1 430 local_pf(i,j,nzb+1) = ts(j,i) 431 ENDDO 432 ENDDO 433 slicer_position = zu(nzb+1) 434 435 436 CASE DEFAULT 437 ! 438 ! The DEFAULT case is reached either if output_variable contains 439 ! unsupported variable or if the user has coded a special case in 440 ! the user interface. There, the subroutine user_data_output_dvrp 441 ! checks which of these two conditions applies. 442 CALL user_data_output_dvrp( output_variable, local_pf ) 443 444 445 END SELECT 446 423 424 CASE ( 'u*_xy' ) 425 DO i = nxl_dvrp, nxr_dvrp+1 426 DO j = nys_dvrp, nyn_dvrp+1 427 local_pf(i,j,nzb+1) = us(j,i) 428 ENDDO 429 ENDDO 430 slicer_position = zu(nzb+1) 431 432 CASE ( 't*_xy' ) 433 DO i = nxl_dvrp, nxr_dvrp+1 434 DO j = nys_dvrp, nyn_dvrp+1 435 local_pf(i,j,nzb+1) = ts(j,i) 436 ENDDO 437 ENDDO 438 slicer_position = zu(nzb+1) 439 440 441 CASE DEFAULT 442 ! 443 ! The DEFAULT case is reached either if output_variable 444 ! contains unsupported variable or if the user has coded a 445 ! special case in the user interface. There, the subroutine 446 ! user_data_output_dvrp checks which of these two conditions 447 ! applies. 448 CALL user_data_output_dvrp( output_variable, local_pf ) 449 450 451 END SELECT 452 453 ENDIF 447 454 448 455 IF ( mode_dvrp(m)(1:10) == 'isosurface' ) THEN … … 489 496 CALL DVRP_THRESHOLD( (m1)1, tmp_c_alpha ) 490 497 491 tmp_th = threshold(tv) 498 IF ( dvrp_overlap ) THEN 499 tmp_th = threshold(tv) 500 ELSE 501 tmp_th = 1.0 ! nothing is plotted because array values are 0 502 ENDIF 503 492 504 CALL DVRP_THRESHOLD( m1, tmp_th ) 493 505 CALL DVRP_VISUALIZE( m1, 21, dvrp_filecount )
Note: See TracChangeset
for help on using the changeset viewer.