Ignore:
Timestamp:
Oct 2, 2015 1:25:23 PM (6 years ago)
Author:
boeske
Message:

Bugfix concerning wall_flags at PE boundaries, added new subroutine exchange_horiz_int

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/init_grid.f90

    r1676 r1677  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Bugfix: Ghost points are included in wall_flags_0 and wall_flags_00
    2323!
    2424! Former revisions:
     
    717717!-- In case of non-cyclic lateral boundaries, the order of the advection
    718718!-- scheme have to be reduced up to nzt (required at the lateral boundaries).
    719     nzb_max = MAXVAL( nzb_local )
     719    nzb_max = MAXVAL( nzb_local ) + 1
    720720    IF ( inflow_l .OR. outflow_l .OR. inflow_r .OR. outflow_r .OR.             &
    721721         inflow_n .OR. outflow_n .OR. inflow_s .OR. outflow_s )  THEN
     
    11881188!
    11891189!-- Allocate flags needed for masking walls.
    1190     ALLOCATE( wall_flags_0(nzb:nzt,nys:nyn,nxl:nxr), &
    1191               wall_flags_00(nzb:nzt,nys:nyn,nxl:nxr) )
     1190    ALLOCATE( wall_flags_0(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                    &
     1191              wall_flags_00(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    11921192    wall_flags_0  = 0
    11931193    wall_flags_00 = 0
     
    14531453!
    14541454!--             w component - z-direction
    1455 !--             WS1 (33), WS3 (34), WS5 (35)
     1455!--             WS1 (33), WS3 (34)IF ( inflow_l .OR. outflow_l )  THEN, WS5 (35)
    14561456                flag_set = .FALSE.
    14571457                IF ( k == nzb_w_inner(j,i) .OR. k == nzb_w_inner(j,i) + 1      &
     
    14791479
    14801480!
     1481!-- Exchange 3D integer wall_flags.
     1482    IF ( momentum_advec == 'ws-scheme' .OR. scalar_advec == 'ws-scheme'     &
     1483    .OR. scalar_advec == 'ws-scheme-mono' )  THEN 
     1484!
     1485!--    Exchange ghost points for advection flags
     1486       CALL exchange_horiz_int( wall_flags_0,  nbgp )
     1487       CALL exchange_horiz_int( wall_flags_00, nbgp )
     1488!
     1489!--    Set boundary flags at inflow and outflow boundary in case of
     1490!--    non-cyclic boundary conditions.
     1491       IF ( inflow_l .OR. outflow_l )  THEN
     1492          wall_flags_0(:,:,nxl-1)  = wall_flags_0(:,:,nxl)
     1493          wall_flags_00(:,:,nxl-1) = wall_flags_00(:,:,nxl)
     1494       ENDIF
     1495
     1496       IF ( inflow_r .OR. outflow_r )  THEN
     1497          wall_flags_0(:,:,nxr+1)  = wall_flags_0(:,:,nxr)
     1498          wall_flags_00(:,:,nxr+1) = wall_flags_00(:,:,nxr)
     1499       ENDIF
     1500
     1501       IF ( inflow_n .OR. outflow_n )  THEN
     1502          wall_flags_0(:,nyn+1,:)  = wall_flags_0(:,nyn,:)
     1503          wall_flags_00(:,nyn+1,:) = wall_flags_00(:,nyn,:)
     1504       ENDIF
     1505
     1506       IF ( inflow_s .OR. outflow_s )  THEN
     1507          wall_flags_0(:,nys-1,:)  = wall_flags_0(:,nys,:)
     1508          wall_flags_00(:,nys-1,:) = wall_flags_00(:,nys,:)
     1509       ENDIF
     1510
     1511    ENDIF
     1512
     1513!
    14811514!-- In case of topography: limit near-wall mixing length l_wall further:
    14821515!-- Go through all points of the subdomain one by one and look for the closest
Note: See TracChangeset for help on using the changeset viewer.