Changeset 4855 for palm/trunk/SOURCE


Ignore:
Timestamp:
Jan 25, 2021 12:30:54 PM (4 years ago)
Author:
raasch
Message:

bugfix: mean w removal not applied to ghost points of the total domain in case of non-cyclic setups (pres), bugfix for correct identification of indices of extreme values in case of non-cyclic boundary conditions

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

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

    r4828 r4855  
    2323! -----------------
    2424! $Id$
     25! bugfix for correct identification of indices of extreme values in case of non-cyclic
     26! boundary conditions
     27!
     28! 4828 2021-01-05 11:21:41Z Giersch
    2529! preprocessor branch for ibm removed
    2630!
     
    5155                            value1_ijk )
    5256
     57
     58    USE control_parameters,                                                                        &
     59        ONLY:  bc_lr, bc_ns
    5360
    5461    USE indices,                                                                                   &
     
    388395
    389396!
    390 !-- Limit index values to the range 0..nx, 0..ny
    391     IF ( value_ijk(3) < 0  ) value_ijk(3) = nx +1 + value_ijk(3)
    392     IF ( value_ijk(3) > nx ) value_ijk(3) = value_ijk(3) - (nx+1)
    393     IF ( value_ijk(2) < 0  ) value_ijk(2) = ny +1 + value_ijk(2)
    394     IF ( value_ijk(2) > ny ) value_ijk(2) = value_ijk(2) - (ny+1)
     397!-- Limit index values to the range 0..nx, 0..ny. Non-cyclic setups may have extrema at the
     398!-- outer borders, which should be correctly identified.
     399    IF ( bc_lr == 'cyclic' )  THEN
     400       IF ( value_ijk(3) < 0  ) value_ijk(3) = nx +1 + value_ijk(3)
     401       IF ( value_ijk(3) > nx ) value_ijk(3) = value_ijk(3) - (nx+1)
     402    ENDIF
     403    IF ( bc_ns == 'cyclic' )  THEN
     404       IF ( value_ijk(2) < 0  ) value_ijk(2) = ny +1 + value_ijk(2)
     405       IF ( value_ijk(2) > ny ) value_ijk(2) = value_ijk(2) - (ny+1)
     406    ENDIF
    395407
    396408 END SUBROUTINE global_min_max
  • palm/trunk/SOURCE/pres.f90

    r4828 r4855  
    2525! -----------------
    2626! $Id$
     27! bugfix: mean w removal not applied to ghost points of the total domain in case of non-cyclic
     28! setups
     29!
     30! 4828 2021-01-05 11:21:41Z Giersch
    2731! Bugfix in OpenMP directives - intel compiler do not allow reduction operations on array elements
    2832!
     
    357361          w_l(k) = w_l(k) / ngp_2dh_outer(k,0)
    358362       ENDDO
    359        DO  i = nxlg, nxrg
    360           DO  j = nysg, nyng
     363       DO  i = nxl, nxr
     364          DO  j = nys, nyn
    361365             DO  k = nzb+1, nzt
    362366                w(k,j,i) = w(k,j,i) - w_l(k)                                                       &
     
    365369          ENDDO
    366370       ENDDO
     371!
     372!--    Instead of running the above loop over ghost points, they are set via exchange_horiz,
     373!--    in order to correctly consider non-cyclic boundary conditions, where ghost boundaries
     374!--    of the total domain must not be set. Otherwise w may continuously increase/decrease
     375!--    at these points.
     376       CALL exchange_horiz( w, nbgp )
    367377    ENDIF
    368378
Note: See TracChangeset for help on using the changeset viewer.