- Timestamp:
- Dec 6, 2019 7:11:33 AM (5 years ago)
- Location:
- palm/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/advec_ws.f90
r4318 r4324 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! Vertical fluxes of w are now set to zero at nzt and nzt+1, setting of 23 ! advection flags for fluxes in z-direction revised, comments extended 23 24 ! 24 25 ! Former revisions: … … 459 460 ENDIF 460 461 ! 461 !-- u component - z-direction. Fluxes are calculated on w-grid level 462 !-- u component - z-direction. Fluxes are calculated on w-grid 463 !-- level. Boundary u-values at/within walls aren't used. 462 464 !-- WS1 (6), WS3 (7), WS5 (8) 463 465 IF ( k == nzb+1 ) THEN … … 478 480 479 481 flag_set = .FALSE. 480 IF ( .NOT. BTEST(wall_flags_0(k-1,j,i),1) .AND. & 481 BTEST(wall_flags_0(k,j,i),1) .OR. & 482 .NOT. BTEST(wall_flags_0(k_pp,j,i),1) .AND. & 483 BTEST(wall_flags_0(k,j,i),1) .OR. & 482 IF ( ( .NOT. BTEST(wall_flags_0(k-1,j,i),1) .AND. & 483 BTEST(wall_flags_0(k,j,i),1) .AND. & 484 BTEST(wall_flags_0(k+1,j,i),1) ) .OR. & 485 ( .NOT. BTEST(wall_flags_0(k_pp,j,i),1) .AND. & 486 BTEST(wall_flags_0(k+1,j,i),1) .AND. & 487 BTEST(wall_flags_0(k,j,i),1) ) .OR. & 484 488 k == nzt ) & 485 489 THEN … … 491 495 BTEST(wall_flags_0(k,j,i),1) .AND. & 492 496 BTEST(wall_flags_0(k+1,j,i),1) .AND. & 493 BTEST(wall_flags_0(k_pp,j,i),1) .OR. & 497 BTEST(wall_flags_0(k_pp,j,i),1) .AND. & 498 .NOT. flag_set .OR. & 494 499 k == nzt - 1 ) & 495 500 THEN … … 587 592 advc_flags_m(k,j,i) = IBCLR( advc_flags_m(k,j,i), 12 ) 588 593 ENDIF 589 ! 590 !-- v component - z-direction. Fluxes are calculated on w-grid level 594 ! 595 !-- v component - z-direction. Fluxes are calculated on w-grid 596 !-- level. Boundary v-values at/within walls aren't used. 591 597 !-- WS1 (15), WS3 (16), WS5 (17) 592 598 IF ( k == nzb+1 ) THEN … … 607 613 608 614 flag_set = .FALSE. 609 IF ( .NOT. BTEST(wall_flags_0(k-1,j,i),2) .AND. & 610 BTEST(wall_flags_0(k,j,i),2) .OR. & 611 .NOT. BTEST(wall_flags_0(k_pp,j,i),2) .AND. & 612 BTEST(wall_flags_0(k,j,i),2) .OR. & 615 IF ( ( .NOT. BTEST(wall_flags_0(k-1,j,i),2) .AND. & 616 BTEST(wall_flags_0(k,j,i),2) .AND. & 617 BTEST(wall_flags_0(k+1,j,i),2) ) .OR. & 618 ( .NOT. BTEST(wall_flags_0(k_pp,j,i),2) .AND. & 619 BTEST(wall_flags_0(k+1,j,i),2) .AND. & 620 BTEST(wall_flags_0(k,j,i),2) ) .OR. & 613 621 k == nzt ) & 614 622 THEN … … 620 628 BTEST(wall_flags_0(k,j,i),2) .AND. & 621 629 BTEST(wall_flags_0(k+1,j,i),2) .AND. & 622 BTEST(wall_flags_0(k_pp,j,i),2) .OR. & 630 BTEST(wall_flags_0(k_pp,j,i),2) .AND. & 631 .NOT. flag_set .OR. & 623 632 k == nzt - 1 ) & 624 633 THEN … … 714 723 advc_flags_m(k,j,i) = IBCLR( advc_flags_m(k,j,i), 21 ) 715 724 ENDIF 716 ! 725 ! 717 726 !-- w component - z-direction. Fluxes are calculated on scalar grid 718 !-- level. WS1 (24), WS3 (25), WS5 (26) 727 !-- level. Boundary w-values at walls are used. Flux at k=i is 728 !-- defined at scalar position k=i+1 with i being an integer. 729 !-- WS1 (24), WS3 (25), WS5 (26) 719 730 IF ( k == nzb+1 ) THEN 720 731 k_mm = nzb … … 755 766 BTEST(wall_flags_0(k-1,j,i),3) .AND. & 756 767 BTEST(wall_flags_0(k,j,i),3) .AND. & 757 BTEST(wall_flags_0(k+1,j,i),3) .OR. & 768 BTEST(wall_flags_0(k+1,j,i),3) .AND. & 769 .NOT. flag_set .OR. & 758 770 k == nzt - 1 ) & 759 771 THEN … … 1036 1048 1037 1049 ! 1038 !-- scalar - z-direction. Fluxes are calculated on w-grid level 1050 !-- scalar - z-direction. Fluxes are calculated on w-grid 1051 !-- level. Boundary values at/within walls aren't used. 1039 1052 !-- WS1 (6), WS3 (7), WS5 (8) 1040 1053 IF ( k == nzb+1 ) THEN … … 1068 1081 BTEST(wall_flags_0(k,j,i),0) .AND. & 1069 1082 BTEST(wall_flags_0(k+1,j,i),0) .AND. & 1070 BTEST(wall_flags_0(k_pp,j,i),0) .OR. & 1083 BTEST(wall_flags_0(k_pp,j,i),0) .AND. & 1084 .NOT. flag_set .OR. & 1071 1085 k == nzt - 1 ) & 1072 1086 THEN … … 3466 3480 ) 3467 3481 ENDDO 3482 3483 ! 3484 !-- Set resolved/turbulent flux at model top to zero (w-level). Hint: The 3485 !-- flux at nzt is defined at the scalar grid point nzt+1. Therefore, the 3486 !-- flux at nzt+1 is already outside of the model domain 3487 flux_t(nzt) = 0.0_wp 3488 diss_t(nzt) = 0.0_wp 3489 w_comp(nzt) = 0.0_wp 3490 3491 flux_t(nzt+1) = 0.0_wp 3492 diss_t(nzt+1) = 0.0_wp 3493 w_comp(nzt+1) = 0.0_wp 3468 3494 3469 3495 DO k = nzb+1, nzb_max_l
Note: See TracChangeset
for help on using the changeset viewer.