Changeset 4301


Ignore:
Timestamp:
Nov 22, 2019 12:09:09 PM (19 months ago)
Author:
oliver.maas
Message:

Deleted parameter recycling_yshift. y-shift in case of non-cyclic boundary conditions and turbulent_inflow = .TRUE. is now steered by parameter y_shift, that is also used in case of cyclic boundary conditions.

Location:
palm/trunk/SOURCE
Files:
8 edited

Legend:

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

    r4297 r4301  
    2525! -----------------
    2626! 4172 2019-08-20 11:55:33Z oliver.maas
     27! removed message PA0421, concerning old parameter recycling_yshift
     28!
     29! 11:55:33Z oliver.maas
    2730! adjust message to the modified parameter recycling_yshift
    2831!
     
    29742977       recycling_plane = recycling_width / dx
    29752978!
    2976 !--    recycling_yshift will have no effect with only one pe in y-direction
    2977 !--    is possible if there is only one PE in y direction.
    2978        IF ( ( recycling_yshift /= 0 ) .AND. pdims(2) < 2 )  THEN
    2979           WRITE( message_string, * )  'recycling_yshift will have no '  //     &
    2980                                       'effect with only one pe in y-direction.'
    2981           CALL message( 'check_parameters', 'PA0421', 0, 0, 0, 6, 0 )
    2982        ENDIF
    2983 
    2984 !
    29852979!--   Check for correct input of recycling method for thermodynamic quantities
    29862980       IF ( TRIM( recycling_method_for_thermodynamic_quantities ) /= 'turbulent_fluctuation' .AND. &
  • palm/trunk/SOURCE/header.f90

    r4300 r4301  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! replaced recycling_yshift by y_shift
    2323!
    2424! Former revisions:
    2525! -----------------
    2626! $Id$
     27!
     28! 4297 2019-11-21 10:37:50Z oliver.maas
    2729! Adjusted format for simulated time and related quantities
    2830!
     
    926928       WRITE ( io, 318 )  use_cmax, pt_damping_width, pt_damping_factor       
    927929       IF ( turbulent_inflow )  THEN
    928           IF ( recycling_yshift == 0 ) THEN
     930          IF ( y_shift == 0 ) THEN
    929931             WRITE ( io, 319 )  recycling_width, recycling_plane, &
    930932                                inflow_damping_height, inflow_damping_width
    931933          ELSE
    932              WRITE ( io, 322 )  recycling_yshift, recycling_width, recycling_plane, &
     934             WRITE ( io, 322 )  y_shift, recycling_width, recycling_plane, &
    933935                                inflow_damping_height, inflow_damping_width
    934936          END IF
     
    17411743              ' ----------------')
    17421744322 FORMAT ('       turbulence recycling at inflow switched on'/ &
    1743             '       y shift of the recycled inflow turbulence is',I3,' PE'/ &
     1745            '       y-shift of the recycled inflow turbulence is',I3,' PE'/ &
    17441746            '       width of recycling domain: ',F7.1,' m   grid index: ',I4/ &
    17451747            '       inflow damping height: ',F6.1,' m   width: ',F6.1,' m'/)
  • palm/trunk/SOURCE/inflow_turbulence.f90

    r4297 r4301  
    2525! -----------------
    2626! $Id$
     27! use y_shift instead of old parameter recycling_yshift
     28!
     29! 4297 2019-11-21 10:37:50Z oliver.maas
    2730! changed recycling_yshift so that the y-shift can be a multiple of PE
    2831! instead of y-shift of a half domain width
     
    5558       
    5659    USE control_parameters,                                                    &
    57         ONLY:  humidity, passive_scalar, recycling_plane, recycling_yshift,    &
     60        ONLY:  humidity, passive_scalar, recycling_plane, y_shift,    &
    5861               recycling_method_for_thermodynamic_quantities
    5962       
     
    8790       inflow_dist        !< turbulence signal of vars, added at inflow boundary
    8891    REAL(wp), DIMENSION(nzb:nzt+1,nysg:nyng,7,nbgp) ::                         &
    89        local_inflow_dist  !< auxiliary variable for inflow_dist, used for yshift
     92       local_inflow_dist  !< auxiliary variable for inflow_dist, used for y-shift
    9093   
    9194    CALL cpu_log( log_point(40), 'inflow_turbulence', 'start' )
     
    245248!-- y-shift for inflow_dist
    246249!-- Shift inflow_dist in positive y direction by a number of
    247 !-- PEs equal to recycling_yshift
    248     IF ( ( recycling_yshift /= 0 ) .AND. myidx == id_inflow ) THEN
     250!-- PEs equal to y_shift
     251    IF ( ( y_shift /= 0 ) .AND. myidx == id_inflow ) THEN
    249252
    250253!
    251254!--    Calculate the ID of the PE which sends data to this PE (prev) and of the
    252255!--    PE which receives data from this PE (next).
    253        prev = MODULO(myidy - recycling_yshift , pdims(2))
    254        next = MODULO(myidy + recycling_yshift , pdims(2))
     256       prev = MODULO(myidy - y_shift , pdims(2))
     257       next = MODULO(myidy + y_shift , pdims(2))
    255258       
    256259       local_inflow_dist = 0.0_wp
  • palm/trunk/SOURCE/init_pegrid.f90

    r4264 r4301  
    2525! -----------------
    2626! $Id$
     27! changed message PA0467
     28!
     29! 4264 2019-10-15 16:00:23Z scharf
    2730! corrected error message string
    2831!
     
    237240!-- Get coordinates of left and right neighbor on PE grid
    238241    IF ( y_shift /= 0 ) THEN
    239 
    240        IF ( bc_lr /= 'cyclic'  .OR.  bc_ns /= 'cyclic' )  THEN
    241           message_string = 'y_shift /= 0 is only allowed for cyclic ' //       &
    242                            'boundary conditions in both directions '
    243           CALL message( 'check_parameters', 'PA0467', 1, 2, 0, 6, 0 )
    244        ENDIF
    245        IF ( TRIM( psolver ) /= 'multigrid' .AND.                               &
    246             TRIM( psolver ) /= 'multigrid_noopt')                              &
    247        THEN
    248           message_string = 'y_shift /= 0 requires a multigrid pressure solver '
    249           CALL message( 'check_parameters', 'PA0468', 1, 2, 0, 6, 0 )
    250        ENDIF
    251 
    252        CALL MPI_CART_COORDS( comm2d, pright, ndim, rcoord, ierr )
    253        CALL MPI_CART_COORDS( comm2d, pleft, ndim, lcoord, ierr )
    254 
    255 !
    256 !--    If the x(y)-coordinate of the right (left) neighbor is smaller (greater)
    257 !--    than that of the calling process, then the calling process is located on
    258 !--    the right (left) boundary of the processor grid. In that case,
    259 !--    the y-coordinate of that neighbor is increased (decreased) by y_shift.
    260 !--    The rank of the process with that coordinate is then inquired and the
    261 !--    neighbor rank for MPI_SENDRECV, pright (pleft) is set to it.
    262 !--    In this way, the calling process receives a new right (left) neighbor
    263 !--    for all future MPI_SENDRECV calls. That neighbor has a y-coordinate
    264 !--    of y+(-)y_shift, where y is the original right (left) neighbor's
    265 !--    y-coordinate. The modulo-operation ensures that if the neighbor's
    266 !--    y-coordinate exceeds the grid-boundary, it will be relocated to
    267 !--    the opposite part of the grid cyclicly.
    268        IF ( rcoord(1) < pcoord(1) ) THEN
    269           rcoord(2) = MODULO( rcoord(2) + y_shift, pdims(2) )
    270           CALL MPI_CART_RANK( comm2d, rcoord, pright, ierr )
    271        ENDIF
    272 
    273        IF ( lcoord(1) > pcoord(1) ) THEN
    274           lcoord(2) = MODULO( lcoord(2) - y_shift, pdims(2) )
    275           CALL MPI_CART_RANK( comm2d, lcoord, pleft, ierr )
     242       IF ( bc_lr == 'cyclic' ) THEN
     243          IF ( TRIM( psolver ) /= 'multigrid' .AND.                            &
     244                TRIM( psolver ) /= 'multigrid_noopt')                          &
     245          THEN
     246             message_string = 'y_shift /= 0 requires a multigrid pressure solver '
     247             CALL message( 'check_parameters', 'PA0468', 1, 2, 0, 6, 0 )
     248          ENDIF
     249
     250          CALL MPI_CART_COORDS( comm2d, pright, ndim, rcoord, ierr )
     251          CALL MPI_CART_COORDS( comm2d, pleft, ndim, lcoord, ierr )
     252
     253!   
     254!--       If the x(y)-coordinate of the right (left) neighbor is smaller (greater)
     255!--       than that of the calling process, then the calling process is located on
     256!--       the right (left) boundary of the processor grid. In that case,
     257!--       the y-coordinate of that neighbor is increased (decreased) by y_shift.
     258!--       The rank of the process with that coordinate is then inquired and the
     259!--       neighbor rank for MPI_SENDRECV, pright (pleft) is set to it.
     260!--       In this way, the calling process receives a new right (left) neighbor
     261!--       for all future MPI_SENDRECV calls. That neighbor has a y-coordinate
     262!--       of y+(-)y_shift, where y is the original right (left) neighbor's
     263!--       y-coordinate. The modulo-operation ensures that if the neighbor's
     264!--       y-coordinate exceeds the grid-boundary, it will be relocated to
     265!--       the opposite part of the grid cyclicly.
     266          IF ( rcoord(1) < pcoord(1) ) THEN
     267             rcoord(2) = MODULO( rcoord(2) + y_shift, pdims(2) )
     268             CALL MPI_CART_RANK( comm2d, rcoord, pright, ierr )
     269          ENDIF
     270
     271          IF ( lcoord(1) > pcoord(1) ) THEN
     272             lcoord(2) = MODULO( lcoord(2) - y_shift, pdims(2) )
     273             CALL MPI_CART_RANK( comm2d, lcoord, pleft, ierr )
     274          ENDIF
     275         
     276       ELSE
     277!
     278!--       y-shift for non-cyclic boundary conditions is only implemented
     279!--       for the turbulence recycling method in inflow_turbulence.f90
     280          IF ( .NOT. turbulent_inflow )  THEN
     281             message_string = 'y_shift /= 0 is only allowed for cyclic ' //    &
     282                              'boundary conditions in both directions '  //    &
     283                              'or with turbulent_inflow == .TRUE.'
     284             CALL message( 'check_parameters', 'PA0467', 1, 2, 0, 6, 0 )
     285          ENDIF
    276286       ENDIF
    277287    ENDIF
  • palm/trunk/SOURCE/modules.f90

    r4297 r4301  
    2525! -----------------
    2626! $Id$
     27! removed recycling_yshift
     28!
     29! 4297 2019-11-21 10:37:50Z oliver.maas
    2730! changed variable type of recycling_yshift from LOGICAL to INTEGER
    2831!
     
    645648    INTEGER(iwp) ::  vg_vertical_gradient_level_ind(10) = -9999  !< grid index values of vg_vertical_gradient_level(s)
    646649    INTEGER(iwp) ::  subs_vertical_gradient_level_i(10) = -9999  !< grid index values of subs_vertical_gradient_level(s)
    647     INTEGER(iwp) ::  recycling_yshift = 0                        !< namelist parameter
    648650    INTEGER(iwp), DIMENSION(0:1) ::  ntdim_2d_xy  !< number of output intervals for 2d data (xy)
    649651    INTEGER(iwp), DIMENSION(0:1) ::  ntdim_2d_xz  !< number of output intervals for 2d data (xz)
  • palm/trunk/SOURCE/parin.f90

    r4227 r4301  
    2525! -----------------
    2626! $Id$
     27! removed recycling_yshift
     28!
     29! 4227 2019-09-10 18:04:34Z gronemeier
    2730! implement new palm_date_time_mod
    2831!
     
    190193             random_generator, random_heatflux, rans_const_c, rans_const_sigma,&
    191194             rayleigh_damping_factor, rayleigh_damping_height,                 &
    192              recycling_method_for_thermodynamic_quantities,                    &
    193              recycling_width, recycling_yshift,                                &
     195             recycling_method_for_thermodynamic_quantities, recycling_width,   &
    194196             reference_state, residual_limit,                                  &
    195197             rotation_angle,                                                   &
     
    263265             random_generator, random_heatflux, rans_const_c, rans_const_sigma,&
    264266             rayleigh_damping_factor, rayleigh_damping_height,                 &
    265              recycling_method_for_thermodynamic_quantities,                    &
    266              recycling_width, recycling_yshift,                                &
     267             recycling_method_for_thermodynamic_quantities, recycling_width,   &
    267268             reference_state, residual_limit,                                  &
    268269             rotation_angle,                                                   &
  • palm/trunk/SOURCE/read_restart_data_mod.f90

    r4227 r4301  
    2525! -----------------
    2626! $Id$
     27! removed recycling_yshift
     28!
     29! 4227 2019-09-10 18:04:34Z gronemeier
    2730! implement new palm_date_time_mod and increased binary version
    2831!
     
    550553             CASE ( 'recycling_width' )
    551554                READ ( 13 )  recycling_width
    552              CASE ( 'recycling_yshift' )
    553                 READ ( 13 ) recycling_yshift
    554555             CASE ( 'ref_state' )
    555556                READ ( 13 )  ref_state
  • palm/trunk/SOURCE/write_restart_data_mod.f90

    r4227 r4301  
    2525! -----------------
    2626! $Id$
     27! removed recycling_yshift
     28!
     29! 4227 2019-09-10 18:04:34Z gronemeier
    2730! implement new palm_date_time_mod and increased binary version
    2831!
     
    555558       WRITE ( 14 )  recycling_width
    556559
    557        CALL wrd_write_string( 'recycling_yshift' )
    558        WRITE ( 14 )  recycling_yshift
    559 
    560560       CALL wrd_write_string( 'ref_state' )
    561561       WRITE ( 14 )  ref_state
Note: See TracChangeset for help on using the changeset viewer.