Changeset 2021


Ignore:
Timestamp:
Oct 7, 2016 2:08:57 PM (5 years ago)
Author:
suehring
Message:

Bugfix, restore flags for nest boundaries in multigrid solver; bugfix: setting Neumann boundary conditions for topography arrays in case of non-cyclic boundary conditions

Location:
palm/trunk/SOURCE
Files:
3 edited

Legend:

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

    r2001 r2021  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Bugfix: setting Neumann boundary conditions for topography required for
     23! topography flags in multigrid_noopt solver
    2324!
    2425! Former revisions:
     
    211212               io_blocks, io_group, inflow_l, inflow_n, inflow_r, inflow_s,    &
    212213               masking_method, maximum_grid_level, message_string,             &
    213                momentum_advec, nest_domain, ocean, outflow_l, outflow_n,       &
     214               momentum_advec, nest_domain, nest_bound_l, nest_bound_n,        &
     215               nest_bound_r, nest_bound_s, ocean, outflow_l, outflow_n,        &
    214216               outflow_r, outflow_s, psolver, scalar_advec, topography,        &
    215217               topography_grid_convention, use_surface_fluxes, use_top_fluxes, &
    216                wall_adjustment_factor 
    217        
     218               wall_adjustment_factor
     219         
    218220    USE grid_variables,                                                        &
    219221        ONLY:  ddx, ddx2, ddx2_mg, ddy, ddy2, ddy2_mg, dx, dx2, dy, dy2, fwxm, &
     
    13431345!--          Set non-cyclic boundary conditions on respective multigrid level
    13441346             IF ( .NOT. bc_ns_cyc )  THEN
    1345                 IF ( nys == 0  )  THEN
     1347                IF ( inflow_s .OR. outflow_s .OR. nest_bound_s  )  THEN
    13461348                   nzb_tmp(-2,:) = nzb_tmp(0,:)
    13471349                   nzb_tmp(-1,:) = nzb_tmp(0,:)
    13481350                ENDIF
    1349                 IF ( nyn == ny )  THEN
    1350                    nzb_tmp(ny+2,:) = nzb_tmp(ny,:)
    1351                    nzb_tmp(ny+1,:) = nzb_tmp(ny,:)
     1351                IF ( inflow_n .OR. outflow_n .OR. nest_bound_n )  THEN
     1352                   nzb_tmp(nyn_l+2,:) = nzb_tmp(nyn_l,:)
     1353                   nzb_tmp(nyn_l+1,:) = nzb_tmp(nyn_l,:)
    13521354                ENDIF
    13531355             ENDIF
    13541356             IF ( .NOT. bc_lr_cyc )  THEN
    1355                 IF ( nxl == 0  )  THEN
     1357                IF ( inflow_l .OR. outflow_l .OR. nest_bound_l  )  THEN
    13561358                   nzb_tmp(:,-2) = nzb_tmp(:,0)
    13571359                   nzb_tmp(:,-1) = nzb_tmp(:,0)
    13581360                ENDIF
    1359                 IF ( nxr == nx )  THEN
    1360                    nzb_tmp(:,nx+1) = nzb_tmp(:,nx)   
    1361                    nzb_tmp(:,nx+2) = nzb_tmp(:,nx)     
     1361                IF ( inflow_r .OR. outflow_r .OR. nest_bound_r )  THEN
     1362                   nzb_tmp(:,nxr_l+1) = nzb_tmp(:,nxr_l)   
     1363                   nzb_tmp(:,nxr_l+2) = nzb_tmp(:,nxr_l)     
    13621364                ENDIF       
    13631365             ENDIF
     
    14201422!
    14211423!-- Allocate flags needed for masking walls. Even though these flags are only
    1422 !-- required in the ws-scheme, the arrays need to be allocated as they are
     1424!-- required in the ws-scheme, the arrays need to be allocated here as they are
    14231425!-- used in OpenACC directives.
    14241426    ALLOCATE( wall_flags_0(nzb:nzt+1,nysg:nyng,nxlg:nxrg),                     &
     
    14271429    wall_flags_00 = 0
    14281430!
    1429 !-- Init flags for ws-scheme to degrade order near walls
     1431!-- Init flags for ws-scheme to degrade order of the numerics near walls, i.e.
     1432!-- to decrease the numerical stencil appropriately.
    14301433    IF ( momentum_advec == 'ws-scheme'  .OR.  scalar_advec == 'ws-scheme'  .OR.&
    14311434         scalar_advec   == 'ws-scheme-mono' )  THEN
  • palm/trunk/SOURCE/poismg_mod.f90

    r2001 r2021  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Bugfix: restore nest_bound_(l/r/s/n) in case of mg_switch_to_pe0
    2323!
    2424! Former revisions:
     
    16071607
    16081608!
    1609 !--          For non-cyclic lateral boundary conditions, restore the
    1610 !--          in-/outflow conditions
     1609!--          For non-cyclic lateral boundary conditions and in case of nesting,
     1610!--          restore the in-/outflow conditions.
    16111611             inflow_l  = .FALSE.;  inflow_r  = .FALSE.
    16121612             inflow_n  = .FALSE.;  inflow_s  = .FALSE.
    16131613             outflow_l = .FALSE.;  outflow_r = .FALSE.
    16141614             outflow_n = .FALSE.;  outflow_s = .FALSE.
     1615!
     1616!--          In case of nesting, restore lateral boundary conditions
     1617             IF ( nest_domain )  THEN
     1618                nest_bound_l = .FALSE.
     1619                nest_bound_r = .FALSE.
     1620                nest_bound_s = .FALSE.
     1621                nest_bound_n = .FALSE.     
     1622             ENDIF
    16151623
    16161624             IF ( pleft == MPI_PROC_NULL )  THEN
  • palm/trunk/SOURCE/poismg_noopt.f90

    r2001 r2021  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Bugfix: restore nest_bound_(l/r/s/n) in case of mg_switch_to_pe0
    2323!
    2424! Former revisions:
     
    15611561
    15621562!
    1563 !--       For non-cyclic lateral boundary conditions, restore the
    1564 !--       in-/outflow conditions
     1563!--       For non-cyclic lateral boundary conditions and in case of nesting,
     1564!--       restore the in-/outflow conditions.
    15651565          inflow_l  = .FALSE.;  inflow_r  = .FALSE.
    15661566          inflow_n  = .FALSE.;  inflow_s  = .FALSE.
    15671567          outflow_l = .FALSE.;  outflow_r = .FALSE.
    15681568          outflow_n = .FALSE.;  outflow_s = .FALSE.
     1569!
     1570!--       In case of nesting, restore lateral boundary conditions
     1571          IF ( nest_domain )  THEN
     1572             nest_bound_l = .FALSE.
     1573             nest_bound_r = .FALSE.
     1574             nest_bound_s = .FALSE.
     1575             nest_bound_n = .FALSE.     
     1576          ENDIF
    15691577
    15701578          IF ( pleft == MPI_PROC_NULL )  THEN
Note: See TracChangeset for help on using the changeset viewer.