Ignore:
Timestamp:
Mar 5, 2020 3:59:50 PM (5 years ago)
Author:
raasch
Message:

bugfix: cpp-directives for serial mode added

File:
1 edited

Legend:

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

    r4360 r4444  
    2525! -----------------
    2626! $Id$
     27! bugfix: cpp-directives for serial mode added
     28!
     29! 4360 2020-01-07 11:25:50Z suehring
    2730! changed message PA0467
    2831!
     
    8285        ONLY:  bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r, bc_dirichlet_s, &
    8386               bc_lr, bc_ns, bc_radiation_l, bc_radiation_n, bc_radiation_r,   &
    84                bc_radiation_s, coupling_mode, coupling_topology, gathered_size,&
     87               bc_radiation_s, &
    8588               grid_level, grid_level_count, maximum_grid_level,               &
    86                message_string, mg_switch_to_pe0_level, momentum_advec,         &
    87                psolver, outflow_source_plane, recycling_width, scalar_advec,   &
    88                subdomain_size, turbulent_inflow, turbulent_outflow, y_shift
     89               message_string, mg_switch_to_pe0_level,         &
     90               psolver
     91
     92
     93#if defined( __parallel )
     94    USE control_parameters,                                                    &
     95        ONLY:  coupling_mode, coupling_topology, gathered_size, momentum_advec, &
     96               outflow_source_plane, recycling_width, scalar_advec, subdomain_size, &
     97               turbulent_inflow, turbulent_outflow, y_shift
    8998
    9099    USE grid_variables,                                                        &
    91100        ONLY:  dx
     101#endif
    92102       
    93103    USE indices,                                                               &
    94         ONLY:  mg_loc_ind, nbgp, nnx, nny, nnz, nx, nx_a, nx_o, nxl, nxl_mg,   &
    95                nxlu, nxr, nxr_mg, ny, ny_a, ny_o, nyn, nyn_mg, nys, nys_mg,    &
     104        ONLY:  nnx, nny, nnz, nx, nxl, nxl_mg,   &
     105               nxlu, nxr, nxr_mg, ny, nyn, nyn_mg, nys, nys_mg,    &
    96106               nysv, nz, nzb, nzt, nzt_mg, wall_flags_1, wall_flags_2,         &
    97107               wall_flags_3, wall_flags_4, wall_flags_5, wall_flags_6,         &
    98108               wall_flags_7, wall_flags_8, wall_flags_9, wall_flags_10
     109
     110#if defined( __parallel )
     111    USE indices,                                                               &
     112        ONLY:  mg_loc_ind, nbgp, nx_a, nx_o, ny_a, ny_o
     113#endif
    99114
    100115    USE kinds
     
    102117    USE pegrid
    103118   
     119#if defined( __parallel )
    104120    USE pmc_interface,                                                         &
    105121        ONLY:  nested_run
    106      
     122
    107123    USE spectra_mod,                                                           &
    108         ONLY:  calculate_spectra, dt_dosp
     124        ONLY:  calculate_spectra
    109125
    110126    USE synthetic_turbulence_generator_mod,                                    &
    111127        ONLY:  id_stg_left, id_stg_north, id_stg_right, id_stg_south,          &
    112128               use_syn_turb_gen
     129#endif
    113130
    114131    USE transpose_indices,                                                     &
    115         ONLY:  nxl_y, nxl_yd, nxl_z, nxr_y, nxr_yd, nxr_z, nyn_x, nyn_z, nys_x,&
    116                nys_z, nzb_x, nzb_y, nzb_yd, nzt_x, nzt_yd, nzt_y
     132        ONLY:  nxl_y, nxl_z, nxr_y, nxr_z, nyn_x, nyn_z, nys_x,&
     133               nys_z, nzb_x, nzb_y, nzt_x, nzt_y
     134
     135#if defined( __parallel )
     136    USE transpose_indices,                                                     &
     137        ONLY:  nxl_yd, nxr_yd, nzb_yd, nzt_yd
    117138
    118139    USE vertical_nesting_mod,                                                  &
    119140        ONLY:  vnested, vnest_init_pegrid_domain, vnest_init_pegrid_rank
     141#endif
    120142
    121143    IMPLICIT NONE
    122144
    123145    INTEGER(iwp) ::  i                        !< running index over number of processors or number of multigrid level
     146#if defined( __parallel )
    124147    INTEGER(iwp) ::  id_inflow_l              !< ID indicating processors located at the left inflow boundary
    125148    INTEGER(iwp) ::  id_outflow_l             !< local value of id_outflow
     
    131154    INTEGER(iwp) ::  id_stg_south_l           !< south lateral boundary local core id in case of turbulence generator 
    132155    INTEGER(iwp) ::  ind(5)                   !< array containing the subdomain bounds
     156#endif
    133157    INTEGER(iwp) ::  j                        !< running index, used for various loops
    134158    INTEGER(iwp) ::  k                        !< number of vertical grid points in different multigrid level
     
    138162    INTEGER(iwp) ::  mg_levels_z              !< maximum number of grid level allowed along z-direction
    139163    INTEGER(iwp) ::  mg_switch_to_pe0_level_l !< maximum number of grid level with switching to PE 0
     164#if defined( __parallel )
    140165    INTEGER(iwp) ::  nnx_y                    !< quotient of number of grid points along x-direction and number of PEs used along y-direction
    141166    INTEGER(iwp) ::  nny_x                    !< quotient of number of grid points along y-direction and number of PEs used along x-direction
     
    144169    INTEGER(iwp) ::  nnz_y                    !< quotient of number of grid points along z-direction and number of PEs used along x-direction
    145170    INTEGER(iwp) ::  numproc_sqr              !< square root of the number of processors
     171#endif
    146172    INTEGER(iwp) ::  nxl_l                    !< lower index bound along x-direction on subdomain and different multigrid level
    147173    INTEGER(iwp) ::  nxr_l                    !< upper index bound along x-direction on subdomain and different multigrid level
    148174    INTEGER(iwp) ::  nyn_l                    !< lower index bound along y-direction on subdomain and different multigrid level
    149175    INTEGER(iwp) ::  nys_l                    !< upper index bound along y-direction on subdomain and different multigrid level
     176#if defined( __parallel )
    150177    INTEGER(iwp) ::  nzb_l                    !< lower index bound along z-direction on subdomain and different multigrid level
     178#endif
    151179    INTEGER(iwp) ::  nzt_l                    !< upper index bound along z-direction on subdomain and different multigrid level
    152180!$  INTEGER(iwp) ::  omp_get_num_threads      !< number of OpenMP threads
    153181
     182#if defined( __parallel )
    154183    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  ind_all !< dummy array containing index bounds on subdomain, used for gathering
    155184    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  nxlf    !< lower index bound allong x-direction for every PE
     
    161190    INTEGER(iwp)               ::  lcoord(2)            !< PE coordinates of left neighbor along x and y
    162191    INTEGER(iwp)               ::  rcoord(2)            !< PE coordinates of right neighbor along x and y
     192#endif
    163193
    164194!
Note: See TracChangeset for help on using the changeset viewer.