Ignore:
Timestamp:
Jun 29, 2017 9:28:18 AM (7 years ago)
Author:
raasch
Message:

write_binary is of type LOGICAL now, MPI2-related code removed, obsolete variables removed, sendrecv_in_background related parts removed, missing variable descriptions added

File:
1 edited

Legend:

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

    r2296 r2298  
    2525! -----------------
    2626! $Id$
     27! missing variable descriptions have been added,
     28! type of write_binary changed from CHARACTER to LOGICAL
     29! -plot_precision, plot_3d_precision, return_addres, return_username,
     30! avs_data_file, exchange_mg, sendrecvcound_yxd, sendrecv_in_background,
     31! port_name, profile_number, cross_ts_numbers, cross_ts_number_count,
     32! dots_crossindex, dots_index, cross_ts_uymax, cross_ts_uymax_computed,
     33! cross_ts_uymin, cross_ts_uymin_computed
     34!
     35! 2296 2017-06-28 07:53:56Z maronga
    2736! Added parameters for model spinup
    2837!
     
    470479! Description:
    471480! ------------
    472 !> Definition of all variables
    473 !>
    474 !> @todo Add missing variable descriptions (Siggi)
     481!> Definition of global variables
    475482!------------------------------------------------------------------------------!
    476483
     
    485492    USE kinds
    486493
    487     REAL(wp), DIMENSION(:), ALLOCATABLE ::  aex  !< Siggi
    488     REAL(wp), DIMENSION(:), ALLOCATABLE ::  bex  !< Siggi
    489     REAL(wp), DIMENSION(:), ALLOCATABLE ::  dex  !< Siggi
    490     REAL(wp), DIMENSION(:), ALLOCATABLE ::  eex  !< Siggi
     494    REAL(wp), DIMENSION(:), ALLOCATABLE ::  aex  !< exponential coefficient for the Bott-Chlond advection scheme
     495    REAL(wp), DIMENSION(:), ALLOCATABLE ::  bex  !< exponential coefficient for the Bott-Chlond advection scheme
     496    REAL(wp), DIMENSION(:), ALLOCATABLE ::  dex  !< exponential coefficient for the Bott-Chlond advection scheme
     497    REAL(wp), DIMENSION(:), ALLOCATABLE ::  eex  !< exponential coefficient for the Bott-Chlond advection scheme
    491498   
    492499    SAVE
     
    504511    USE kinds
    505512
    506     REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m                  !< Siggi
    507     REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m_l                !< Siggi
    508     REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m                  !< Siggi
    509     REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m_l                !< Siggi
    510     REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m                  !< Siggi
    511     REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m_l                !< Siggi   
     513    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m                  !< mean phase velocity at outflow for u-component used in radiation boundary condition
     514    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_u_m_l                !< mean phase velocity at outflow for u-component used in radiation boundary condition (local subdomain value)
     515    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m                  !< mean phase velocity at outflow for v-component used in radiation boundary condition
     516    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_v_m_l                !< mean phase velocity at outflow for v-component used in radiation boundary condition (local subdomain value)
     517    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m                  !< mean phase velocity at outflow for w-component used in radiation boundary condition
     518    REAL(wp), DIMENSION(:), ALLOCATABLE ::  c_w_m_l                !< mean phase velocity at outflow for w-component used in radiation boundary condition (local subdomain value)
    512519    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ddzu                   !< 1/dzu
    513520    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ddzu_pres              !< modified ddzu for pressure solver
     
    576583    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_v              !< 6th-order advective flux at south face of grid box - v-component
    577584    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  flux_s_w              !< 6th-order advective flux at south face of grid box - w-component
    578     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f1_mg                 !< Siggi
    579     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f2_mg                 !< Siggi
    580     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f3_mg                 !< Siggi
     585    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f1_mg                 !< grid factor used in right hand side of Gauss-Seidel equation (multigrid)
     586    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f2_mg                 !< grid factor used in right hand side of Gauss-Seidel equation (multigrid)
     587    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  f3_mg                 !< grid factor used in right hand side of Gauss-Seidel equation (multigrid)
    581588    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  mean_inflow_profiles  !< used for turbulent inflow (non-cyclic boundary conditions)
    582589    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  precipitation_amount  !< precipitation amount due to gravitational settling (bulk microphysics)
     
    591598    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_sub_lpt            !< temperature tendency due to subsidence/ascent (large scale forcing)
    592599    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_sub_q              !< specific humidity tendency due to subsidence/ascent (large scale forcing)
    593     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_a            !< Siggi
    594     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_o            !< Siggi
     600    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_a            !< horizontal array to store the total domain data, used for atmosphere-ocean coupling (atmosphere data)
     601    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_o            !< horizontal array to store the total domain data, used for atmosphere-ocean coupling (ocean data)
    595602    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ug_vert               !< vertical profile of geostrophic wind component in x-direction interpolated to vertical grid (large scale forcing)
    596603    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  unudge                !< vertical profile of wind component in x-direction interpolated to vertical grid (nudging)
     
    633640    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  l_wall     !< near-wall mixing length
    634641    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  prr        !< rain rate
    635     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  p_loc      !< Siggi
     642    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  p_loc      !< local array in multigrid/sor solver containing the pressure which is iteratively advanced in each iteration step
    636643    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tend       !< tendency field (time integration)
    637     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tric       !< Siggi
    638     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_l      !< Siggi
    639     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_n      !< Siggi
    640     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_r      !< Siggi
    641     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_s      !< Siggi
    642     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_l      !< Siggi
    643     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_n      !< Siggi
    644     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_r      !< Siggi
    645     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_s      !< Siggi
    646     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_l      !< Siggi
    647     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_n      !< Siggi
    648     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_r      !< Siggi
    649     REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_s      !< Siggi
     644    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  tric       !< coefficients of the tridiagonal matrix for solution of the Poisson equation in Fourier space
     645    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_l      !< velocity data (u at left boundary) from time level t-dt required for radiation boundary condition
     646    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_n      !< velocity data (u at north boundary) from time level t-dt required for radiation boundary condition
     647    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_r      !< velocity data (u at right boundary) from time level t-dt required for radiation boundary condition
     648    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  u_m_s      !< velocity data (u at south boundary) from time level t-dt required for radiation boundary condition
     649    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_l      !< velocity data (v at left boundary) from time level t-dt required for radiation boundary condition
     650    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_n      !< velocity data (v at north boundary) from time level t-dt required for radiation boundary condition
     651    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_r      !< velocity data (v at right boundary) from time level t-dt required for radiation boundary condition
     652    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  v_m_s      !< velocity data (v at south boundary) from time level t-dt required for radiation boundary condition
     653    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_l      !< velocity data (w at left boundary) from time level t-dt required for radiation boundary condition
     654    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_n      !< velocity data (w at north boundary) from time level t-dt required for radiation boundary condition
     655    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_r      !< velocity data (w at right boundary) from time level t-dt required for radiation boundary condition
     656    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  w_m_s      !< velocity data (w at south boundary) from time level t-dt required for radiation boundary condition
    650657
    651658#if defined( __nopointer )
     
    786793#endif
    787794
    788     REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  tri      !< Siggi
     795    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  tri    !<  array to hold the tridiagonal matrix for solution of the Poisson equation in Fourier space (4th dimension for threads)
    789796
    790797    REAL(wp), DIMENSION(:), ALLOCATABLE ::  rho_air      !< air density profile on the uv grid
     
    918925    USE kinds
    919926
    920     TYPE plot_precision
    921        CHARACTER (LEN=8) ::  variable   !< Siggi
    922        INTEGER(iwp)      ::  precision  !< Siggi
    923     END TYPE plot_precision
    924 
    925     TYPE(plot_precision), DIMENSION(100) ::  plot_3d_precision =               &  !< Siggi
    926                         (/ plot_precision( 'u', 2 ), plot_precision( 'v', 2 ), &
    927                            plot_precision( 'w', 2 ), plot_precision( 'p', 5 ), &
    928                            plot_precision( 'pt', 2 ),                          &
    929                            ( plot_precision( ' ', 1 ), i9 = 1,95 ) /)
    930 
    931927    TYPE file_status
    932        LOGICAL ::  opened         !< Siggi
    933        LOGICAL ::  opened_before  !< Siggi
     928       LOGICAL ::  opened         !< file is currently open
     929       LOGICAL ::  opened_before  !< file is currently closed, but has been openend before
    934930    END TYPE file_status
    935931   
     
    938934    INTEGER(iwp), PARAMETER ::  varnamelength = 30        !< length of output variable names
    939935
    940     TYPE(file_status), DIMENSION(200+2*max_masks) ::                &  !< Siggi
     936    TYPE(file_status), DIMENSION(200+2*max_masks) ::                &  !< indicates if file is open or if it has been opened before
    941937                             openfile = file_status(.FALSE.,.FALSE.)
    942938
    943939    CHARACTER (LEN=1)    ::  cycle_mg = 'w'                               !< namelist parameter (see documentation)
    944940    CHARACTER (LEN=1)    ::  timestep_reason = ' '                        !< 'A'dvection or 'D'iffusion criterion, written to RUN_CONTROL file
    945     CHARACTER (LEN=3)    ::  coupling_char = ''                           !< Siggi
    946     CHARACTER (LEN=5)    ::  write_binary = 'false'                       !< internal namelist parameter Siggi--> Why is this not a flag?
     941    CHARACTER (LEN=3)    ::  coupling_char = ''                           !< appended to filenames in coupled ocean-atmosphere runs ('_O': ocean PE, '_A': atmosphere PE)
    947942    CHARACTER (LEN=8)    ::  most_method = 'newton'                       !< namelist parameter
    948943    CHARACTER (LEN=8)    ::  run_date                                     !< date of simulation run, printed to HEADER file
     
    952947    CHARACTER (LEN=12)   ::  version = ' '                                !< PALM version number
    953948    CHARACTER (LEN=12)   ::  revision = ' '                               !< PALM revision number
    954     CHARACTER (LEN=12)   ::  user_interface_current_revision = ' '        !< Siggi
    955     CHARACTER (LEN=12)   ::  user_interface_required_revision = ' '       !< Siggi
     949    CHARACTER (LEN=12)   ::  user_interface_current_revision = ' '        !< revision number of the currently used user-interface (must match user_interface_required_revision)
     950    CHARACTER (LEN=12)   ::  user_interface_required_revision = ' '       !< required user-interface revision number
    956951    CHARACTER (LEN=16)   ::  conserve_volume_flow_mode = 'default'        !< namelist parameter
    957952    CHARACTER (LEN=16)   ::  loop_optimization = 'default'                !< namelist parameter
     
    978973    CHARACTER (LEN=20)   ::  cloud_scheme = 'saturation_adjust'           !< namelist parameter
    979974    CHARACTER (LEN=20)   ::  coupling_mode = 'uncoupled'                  !< coupling mode for atmosphere-ocean coupling 
    980     CHARACTER (LEN=20)   ::  coupling_mode_remote = 'uncoupled'           !< Siggi
     975    CHARACTER (LEN=20)   ::  coupling_mode_remote = 'uncoupled'           !< coupling mode of the remote process in case of coupled atmosphere-ocean runs
    981976    CHARACTER (LEN=20)   ::  dissipation_1d = 'detering'                  !< namelist parameter
    982977    CHARACTER (LEN=20)   ::  fft_method = 'system-specific'               !< namelist parameter
     
    984979    CHARACTER (LEN=20)   ::  random_generator = 'random-parallel'         !< namelist parameter
    985980    CHARACTER (LEN=20)   ::  reference_state = 'initial_profile'          !< namelist parameter 
    986     CHARACTER (LEN=20)   ::  return_addres                                !< Siggi
    987     CHARACTER (LEN=20)   ::  return_username                              !< Siggi
    988981    CHARACTER (LEN=20)   ::  timestep_scheme = 'runge-kutta-3'            !< namelist parameter       
    989     CHARACTER (LEN=40)   ::  avs_data_file                                !< Siggi
    990982    CHARACTER (LEN=40)   ::  topography = 'flat'                          !< namelist parameter
    991     CHARACTER (LEN=64)   ::  host = ' '                                   !< Siggi
    992     CHARACTER (LEN=80)   ::  log_message                                  !< Siggi
    993     CHARACTER (LEN=80)   ::  run_identifier                               !< Siggi
     983    CHARACTER (LEN=64)   ::  host = ' '                                   !< hostname on which PALM is running, ENVPAR namelist parameter provided by mrun
     984    CHARACTER (LEN=80)   ::  log_message                                  !< user-defined message for debugging (sse data_log.f90)
     985    CHARACTER (LEN=80)   ::  run_identifier                               !< run identifier as given by mrun option -d, ENVPAR namelist parameter provided by mrun
    994986    CHARACTER (LEN=100)  ::  initializing_actions = ' '                   !< namelist parameter
    995     CHARACTER (LEN=210)  ::  run_description_header                       !< Siggi
     987    CHARACTER (LEN=210)  ::  run_description_header                       !< string containing diverse run informations as run identifier, coupling mode, host, ensemble number, run date and time
    996988    CHARACTER (LEN=1000) ::  message_string = ' '                         !< dynamic string for error message output
    997989
     
    10211013    INTEGER(iwp) ::  average_count_3d = 0              !< number of samples in 3d output
    10221014    INTEGER(iwp) ::  current_timestep_number = 0       !< current timestep number, printed to RUN_CONTROL file
    1023     INTEGER(iwp) ::  coupling_topology = 0             !< processor topology for atmosphere-ocean coupling  Siggi
    1024     INTEGER(iwp) ::  dist_range = 0                    !< Siggi
     1015    INTEGER(iwp) ::  coupling_topology = 0             !< switch for atmosphere-ocean-coupling: 0: same number of grid points and PEs along x and y in atmosphere and ocean, otherwise 1
     1016    INTEGER(iwp) ::  dist_range = 0                    !< switch for steering the horizontal disturbance range, 1: inflow disturbances in case of non-cyclic horizontal BC, 0: otherwise
    10251017    INTEGER(iwp) ::  disturbance_level_ind_b           !< lowest grid index where flow disturbance is applied
    10261018    INTEGER(iwp) ::  disturbance_level_ind_t           !< highest grid index where flow disturbance is applied
     
    10311023    INTEGER(iwp) ::  dots_time_count = 0               !< number of output intervals for timeseries output
    10321024    INTEGER(iwp) ::  dp_level_ind_b = 0                !< lowest grid index for external pressure gradient forcing
    1033     INTEGER(iwp) ::  dvrp_filecount = 0                !< Siggi
    1034     INTEGER(iwp) ::  dz_stretch_level_index            !< Siggi
     1025    INTEGER(iwp) ::  dvrp_filecount = 0                !< parameter for dvr visualization software
     1026    INTEGER(iwp) ::  dz_stretch_level_index            !< vertical grid level index above which the vertical grid spacing is stretched
    10351027    INTEGER(iwp) ::  ensemble_member_nr = 0            !< namelist parameter
    1036     INTEGER(iwp) ::  gamma_mg                          !< Siggi
    1037     INTEGER(iwp) ::  gathered_size                     !< Siggi
    1038     INTEGER(iwp) ::  grid_level                        !< Siggi
     1028    INTEGER(iwp) ::  gamma_mg                          !< switch for steering the multigrid cycle: 1: v-cycle, 2: w-cycle
     1029    INTEGER(iwp) ::  gathered_size                     !< number of total domain grid points of the grid level which is gathered on PE0 (multigrid solver)
     1030    INTEGER(iwp) ::  grid_level                        !< current grid level handled in the multigrid solver
    10391031    INTEGER(iwp) ::  ibc_e_b                           !< integer flag for bc_e_b
    10401032    INTEGER(iwp) ::  ibc_p_b                           !< integer flag for bc_p_b
     
    10531045    INTEGER(iwp) ::  intermediate_timestep_count       !< number of current Runge-Kutta substep
    10541046    INTEGER(iwp) ::  intermediate_timestep_count_max   !< maximum number of Runge-Kutta substeps
    1055     INTEGER(iwp) ::  io_group = 0                      !< Siggi
    1056     INTEGER(iwp) ::  io_blocks = 1                     !< Siggi
     1047    INTEGER(iwp) ::  io_group = 0                      !< I/O group to which the PE belongs (= #PE / io_blocks)
     1048    INTEGER(iwp) ::  io_blocks = 1                     !< number of blocks for which I/O is done in sequence (total number of PEs / maximum_parallel_io_streams)
    10571049    INTEGER(iwp) ::  iran = -1234567                   !< integer random number used for flow disturbances
    10581050    INTEGER(iwp) ::  lod = 1                           !< level of detail, topography input parameter
    10591051    INTEGER(iwp) ::  masks = 0                         !< counter for number of masked output quantities
    1060     INTEGER(iwp) ::  maximum_grid_level                !< Siggi
    1061     INTEGER(iwp) ::  maximum_parallel_io_streams = -1  !< Siggi
     1052    INTEGER(iwp) ::  maximum_grid_level                !< number of grid levels that the multigrid solver is using
     1053    INTEGER(iwp) ::  maximum_parallel_io_streams = -1  !< maximum number of parallel io streams that the underlying parallel file system allows, set with mrun option -w, ENVPAR namelist parameter, provided by mrun
    10621054    INTEGER(iwp) ::  max_pr_user = 0                   !< number of user-defined profiles (must not change within a job chain)
    1063     INTEGER(iwp) ::  mgcycles = 0                      !< Siggi
     1055    INTEGER(iwp) ::  mgcycles = 0                      !< number of multigrid cycles that the multigrid solver has actually carried out
    10641056    INTEGER(iwp) ::  mg_cycles = -1                    !< namelist parameter
    10651057    INTEGER(iwp) ::  mg_switch_to_pe0_level = -1       !< namelist parameter
     
    10811073    INTEGER(iwp) ::  runnr = 0                         !< number of run in job chain
    10821074    INTEGER(iwp) ::  subdomain_size                    !< number of grid points in (3d) subdomain including ghost points
    1083     INTEGER(iwp) ::  terminate_coupled = 0             !< Siggi
    1084     INTEGER(iwp) ::  terminate_coupled_remote = 0      !< Siggi
    1085     INTEGER(iwp) ::  timestep_count = 0                !< Siggi --> is it not analogue to intermediate_timestep_count
     1075    INTEGER(iwp) ::  terminate_coupled = 0             !< switch for steering termination in case of coupled runs
     1076    INTEGER(iwp) ::  terminate_coupled_remote = 0      !< switch for steering termination in case of coupled runs (condition of the remote model)
     1077    INTEGER(iwp) ::  timestep_count = 0                !< number of timesteps carried out since the beginning of the initial run
    10861078    INTEGER(iwp) ::  dist_nxl(0:1)                               !< left boundary of disturbance region
    10871079    INTEGER(iwp) ::  dist_nxr(0:1)                               !< right boundary of disturbance region
     
    11161108    INTEGER(iwp), DIMENSION(0:1) ::  ntdim_3d     !< number of output intervals for 3d data
    11171109
    1118     INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  grid_level_count  !< Siggi
     1110    INTEGER(iwp), DIMENSION(:), ALLOCATABLE ::  grid_level_count  !< internal switch for steering the multigrid v- and w-cycles
    11191111
    11201112    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mask_i         !< subdomain grid index of masked output point on x-dimension
     
    11581150    LOGICAL ::  dt_3d_reached                                !< internal timestep for particle advection
    11591151    LOGICAL ::  dt_3d_reached_l                              !< internal timestep for particle advection
    1160     LOGICAL ::  exchange_mg = .FALSE.                        !< (Siggi add short description)
    11611152    LOGICAL ::  first_call_lpm = .TRUE.                      !< call lpm only once per timestep?
    11621153    LOGICAL ::  force_print_header = .FALSE.                 !< namelist parameter
    11631154    LOGICAL ::  galilei_transformation = .FALSE.             !< namelist parameter
    11641155    LOGICAL ::  humidity = .FALSE.                           !< namelist parameter
    1165     LOGICAL ::  humidity_remote = .FALSE.                    !< (Siggi add short description)
     1156    LOGICAL ::  humidity_remote = .FALSE.                    !< switch for receiving near-surface humidity flux (atmosphere-ocean coupling)
    11661157    LOGICAL ::  inflow_l = .FALSE.                           !< left domain boundary has non-cyclic inflow?
    11671158    LOGICAL ::  inflow_n = .FALSE.                           !< north domain boundary has non-cyclic inflow?
     
    11791170    LOGICAL ::  microphysics_morrison = .FALSE.              !< use 2-moment Morrison (add. prog. eq. for nc and qc)
    11801171    LOGICAL ::  microphysics_seifert = .FALSE.               !< use 2-moment Seifert and Beheng scheme
    1181     LOGICAL ::  mg_switch_to_pe0 = .FALSE.                   !< (Siggi add short description)
     1172    LOGICAL ::  mg_switch_to_pe0 = .FALSE.                   !< internal multigrid switch for steering the ghost point exchange in case that data has been collected on PE0
    11821173    LOGICAL ::  nest_bound_l = .FALSE.                       !< nested boundary on left side?
    11831174    LOGICAL ::  nest_bound_n = .FALSE.                       !< nested boundary on north side?
     
    11971188    LOGICAL ::  recycling_yshift = .FALSE.                   !< namelist parameter
    11981189    LOGICAL ::  run_control_header = .FALSE.                 !< onetime output of RUN_CONTROL header
    1199     LOGICAL ::  run_coupled = .TRUE.                         !< (Siggi add short description)
     1190    LOGICAL ::  run_coupled = .TRUE.                         !< internal switch telling PALM to run in coupled mode (i.e. to exchange surface data) in case of atmosphere-ocean coupling
    12001191    LOGICAL ::  scalar_rayleigh_damping = .TRUE.             !< namelist parameter
    1201     LOGICAL ::  sloping_surface = .FALSE.                    !< use sloped surface?
    1202                                                              !< (namelist parameter alpha_surface)
     1192    LOGICAL ::  sloping_surface = .FALSE.                    !< use sloped surface? (namelist parameter alpha_surface)
    12031193    LOGICAL ::  spinup = .FALSE.                             !< perform model spinup without atmosphere code?
    1204     LOGICAL ::  stop_dt = .FALSE.                            !< (Siggi add short description)
     1194    LOGICAL ::  stop_dt = .FALSE.                            !< internal switch to stop the time stepping
    12051195    LOGICAL ::  synchronous_exchange = .FALSE.               !< namelist parameter
    12061196    LOGICAL ::  synthetic_turbulence_generator = .FALSE.     !< flag for synthetic turbulence generator module
     
    12221212    LOGICAL ::  virtual_flight = .FALSE.                     !< use virtual flight model?
    12231213    LOGICAL ::  wall_adjustment = .TRUE.                     !< namelist parameter
     1214    LOGICAL ::  write_binary = .FALSE.                       !< ENVPAR namelist parameter to steer restart I/O (ENVPAR is created by mrun)
    12241215    LOGICAL ::  ws_scheme_sca = .FALSE.                      !< use Wicker-Skamarock scheme (scalar advection)?
    12251216    LOGICAL ::  ws_scheme_mom = .FALSE.                      !< use Wicker-Skamarock scheme (momentum advection)?
     1217
    12261218    LOGICAL ::  data_output_xy(0:1) = .FALSE.                !< output of xy cross-section data?
    12271219    LOGICAL ::  data_output_xz(0:1) = .FALSE.                !< output of xz cross-section data?
     
    13641356    REAL(wp) ::  time_restart = 9999999.9_wp                   !< time at which run shall be terminated and restarted
    13651357    REAL(wp) ::  time_run_control = 0.0_wp                     !< time since last RUN_CONTROL output
    1366     REAL(wp) ::  time_since_reference_point                    !< Siggi
     1358    REAL(wp) ::  time_since_reference_point                    !< time after atmosphere-ocean coupling has been activated, or time after spinup phase of LSM has been finished
    13671359    REAL(wp) ::  top_heatflux = 9999999.9_wp                   !< namelist parameter
    13681360    REAL(wp) ::  top_momentumflux_u = 9999999.9_wp             !< namelist parameter
     
    14141406    REAL(wp) ::  vg_vertical_gradient(10) = 0.0_wp                 !< namelist parameter
    14151407    REAL(wp) ::  vg_vertical_gradient_level(10) = -9999999.9_wp    !< namelist parameter
    1416     REAL(wp) ::  volume_flow(1:3) = 0.0_wp                         !< Siggi
    1417     REAL(wp) ::  volume_flow_area(1:3) = 0.0_wp                    !< Siggi
    1418     REAL(wp) ::  volume_flow_initial(1:3) = 0.0_wp                 !< Siggi
     1408    REAL(wp) ::  volume_flow(1:3) = 0.0_wp                         !< volume flow through 1:yz-plane, 2: xz-plane, 3: xy-plane (nest childs only)
     1409    REAL(wp) ::  volume_flow_area(1:3) = 0.0_wp                    !< area of the respective volume flow planes
     1410    REAL(wp) ::  volume_flow_initial(1:3) = 0.0_wp                 !< initial volume flow (t=0) through the respective volume flow planes
    14191411    REAL(wp) ::  wall_heatflux(0:5) = 0.0_wp                       !< namelist parameter
    14201412    REAL(wp) ::  wall_humidityflux(0:5) = 0.0_wp                   !< namelist parameter
     
    14531445    USE kinds
    14541446
    1455     CHARACTER (LEN=10) ::  dvrp_output = 'rtsp'        !< Siggi (entire MODULE)
    1456     CHARACTER (LEN=10) ::  particle_color = 'none'     !<
    1457     CHARACTER (LEN=10) ::  particle_dvrpsize = 'none'  !<
    1458 
    1459     CHARACTER (LEN=20), DIMENSION(10) ::  mode_dvrp = &  !<
     1447    CHARACTER (LEN=10) ::  dvrp_output = 'rtsp'        !< dvr namelist parameter
     1448    CHARACTER (LEN=10) ::  particle_color = 'none'     !< dvr namelist parameter
     1449    CHARACTER (LEN=10) ::  particle_dvrpsize = 'none'  !< dvr namelist parameter
     1450
     1451    CHARACTER (LEN=20), DIMENSION(10) ::  mode_dvrp = &  !< dvr namelist parameter
    14601452                                     (/ ( '                    ', i9 = 1,10 ) /)
    14611453
    1462     CHARACTER (LEN=80) ::  dvrp_directory = 'default'                     !<
    1463     CHARACTER (LEN=80) ::  dvrp_file      = 'default'                     !<
    1464     CHARACTER (LEN=80) ::  dvrp_host      = 'origin.rvs.uni-hannover.de'  !<
    1465     CHARACTER (LEN=80) ::  dvrp_password  = '********'                    !<
    1466     CHARACTER (LEN=80) ::  dvrp_username  = ' '                           !<
    1467 
    1468     INTEGER(iwp) ::  cluster_size = 1                   !<
    1469     INTEGER(iwp) ::  dvrp_colortable_entries = 4        !<
    1470     INTEGER(iwp) ::  dvrp_colortable_entries_prt = 22   !<
    1471     INTEGER(iwp) ::  islice_dvrp                        !<
    1472     INTEGER(iwp) ::  nx_dvrp                            !<
    1473     INTEGER(iwp) ::  nxl_dvrp                           !<
    1474     INTEGER(iwp) ::  nxr_dvrp                           !<
    1475     INTEGER(iwp) ::  ny_dvrp                            !<
    1476     INTEGER(iwp) ::  nyn_dvrp                           !<
    1477     INTEGER(iwp) ::  nys_dvrp                           !<
    1478     INTEGER(iwp) ::  nz_dvrp, pathlines_fadeintime = 5  !<
    1479     INTEGER(iwp) ::  pathlines_fadeouttime = 5          !<
    1480     INTEGER(iwp) ::  pathlines_linecount = 1000         !<
    1481     INTEGER(iwp) ::  pathlines_maxhistory = 40          !<
    1482     INTEGER(iwp) ::  pathlines_wavecount = 10           !<
    1483     INTEGER(iwp) ::  pathlines_wavetime = 50            !<
    1484     INTEGER(iwp) ::  vc_gradient_normals = 0            !<
    1485     INTEGER(iwp) ::  vc_mode = 0                        !<
    1486     INTEGER(iwp) ::  vc_size_x = 2                      !<
    1487     INTEGER(iwp) ::  vc_size_y = 2                      !<
    1488     INTEGER(iwp) ::  vc_size_z = 2                      !<
    1489 
    1490     INTEGER(iwp), DIMENSION(10) ::  slicer_position_dvrp  !<
    1491 
    1492     LOGICAL ::  cyclic_dvrp = .FALSE.                      !<
    1493     LOGICAL ::  dvrp_overlap                               !<
    1494     LOGICAL ::  dvrp_total_overlap                         !<
    1495     LOGICAL ::  local_dvrserver_running                    !< internally set namelist parameter
    1496     LOGICAL ::  lock_steering_update = .FALSE.             !<
    1497     LOGICAL ::  use_seperate_pe_for_dvrp_output = .FALSE.  !<
    1498 
    1499     REAL(wp) ::  clip_dvrp_l = 9999999.9_wp  !<
    1500     REAL(wp) ::  clip_dvrp_n = 9999999.9_wp  !<
    1501     REAL(wp) ::  clip_dvrp_r = 9999999.9_wp  !<
    1502     REAL(wp) ::  clip_dvrp_s = 9999999.9_wp  !<
    1503     REAL(wp) ::  superelevation = 1.0_wp     !<
    1504     REAL(wp) ::  superelevation_x = 1.0_wp   !<
    1505     REAL(wp) ::  superelevation_y = 1.0_wp   !<
    1506     REAL(wp) ::  vc_alpha = 38.0_wp          !<
    1507 
    1508     REAL(wp), DIMENSION(2) ::  color_interval = (/ 0.0_wp, 1.0_wp /)     !<
    1509     REAL(wp), DIMENSION(2) ::  dvrpsize_interval = (/ 0.0_wp, 1.0_wp /)  !<
    1510 
    1511     REAL(wp), DIMENSION(3) ::  groundplate_color = (/ 0.0_wp, 0.6_wp, 0.0_wp /)  !<
    1512     REAL(wp), DIMENSION(3) ::  topography_color = (/ 0.8_wp, 0.7_wp, 0.6_wp /)   !<
    1513 
    1514     REAL(wp), DIMENSION(2,10) ::  slicer_range_limits_dvrp  !<
    1515 
    1516     REAL(wp), DIMENSION(3,10) ::  isosurface_color  !<
    1517 
    1518     REAL(sp), DIMENSION(2,100) ::  interval_values_dvrp          !<
    1519     REAL(sp), DIMENSION(2,100) ::  interval_values_dvrp_prt      !<
    1520     REAL(sp), DIMENSION(2,100) ::  interval_h_dvrp               !<
    1521     REAL(sp), DIMENSION(2,100) ::  interval_h_dvrp_prt           !<
    1522     REAL(sp), DIMENSION(2,100) ::  interval_l_dvrp = 0.5_sp      !<
    1523     REAL(sp), DIMENSION(2,100) ::  interval_l_dvrp_prt = 0.5_sp  !<
    1524     REAL(sp), DIMENSION(2,100) ::  interval_s_dvrp = 1.0_sp      !<
    1525     REAL(sp), DIMENSION(2,100) ::  interval_s_dvrp_prt = 1.0_sp  !<
    1526     REAL(sp), DIMENSION(2,100) ::  interval_a_dvrp = 0.0_sp      !<
    1527     REAL(sp), DIMENSION(2,100) ::  interval_a_dvrp_prt = 0.0_sp  !<
    1528 
    1529     DATA  slicer_range_limits_dvrp / -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &  !<
     1454    CHARACTER (LEN=80) ::  dvrp_directory = 'default'                     !< dvr namelist parameter
     1455    CHARACTER (LEN=80) ::  dvrp_file      = 'default'                     !< dvr namelist parameter
     1456    CHARACTER (LEN=80) ::  dvrp_host      = 'origin.rvs.uni-hannover.de'  !< dvr namelist parameter
     1457    CHARACTER (LEN=80) ::  dvrp_password  = '********'                    !< dvr namelist parameter
     1458    CHARACTER (LEN=80) ::  dvrp_username  = ' '                           !< dvr namelist parameter
     1459
     1460    INTEGER(iwp) ::  cluster_size = 1                   !< dvr namelist parameter
     1461    INTEGER(iwp) ::  dvrp_colortable_entries = 4        !< internal dvr software variable
     1462    INTEGER(iwp) ::  dvrp_colortable_entries_prt = 22   !< internal dvr software variable
     1463    INTEGER(iwp) ::  islice_dvrp                        !< internal dvr software variable
     1464    INTEGER(iwp) ::  nx_dvrp                            !< internal dvr software variable
     1465    INTEGER(iwp) ::  nxl_dvrp                           !< internal dvr software variable
     1466    INTEGER(iwp) ::  nxr_dvrp                           !< internal dvr software variable
     1467    INTEGER(iwp) ::  ny_dvrp                            !< internal dvr software variable
     1468    INTEGER(iwp) ::  nyn_dvrp                           !< internal dvr software variable
     1469    INTEGER(iwp) ::  nys_dvrp                           !< internal dvr software variable
     1470    INTEGER(iwp) ::  nz_dvrp                            !< internal dvr software variable
     1471    INTEGER(iwp) ::  pathlines_fadeintime = 5           !< dvr namelist parameter
     1472    INTEGER(iwp) ::  pathlines_fadeouttime = 5          !< dvr namelist parameter
     1473    INTEGER(iwp) ::  pathlines_linecount = 1000         !< dvr namelist parameter
     1474    INTEGER(iwp) ::  pathlines_maxhistory = 40          !< dvr namelist parameter
     1475    INTEGER(iwp) ::  pathlines_wavecount = 10           !< dvr namelist parameter
     1476    INTEGER(iwp) ::  pathlines_wavetime = 50            !< dvr namelist parameter
     1477    INTEGER(iwp) ::  vc_gradient_normals = 0            !< dvr namelist parameter
     1478    INTEGER(iwp) ::  vc_mode = 0                        !< dvr namelist parameter
     1479    INTEGER(iwp) ::  vc_size_x = 2                      !< dvr namelist parameter
     1480    INTEGER(iwp) ::  vc_size_y = 2                      !< dvr namelist parameter
     1481    INTEGER(iwp) ::  vc_size_z = 2                      !< dvr namelist parameter
     1482
     1483    INTEGER(iwp), DIMENSION(10) ::  slicer_position_dvrp  !< internal dvr software variable
     1484
     1485    LOGICAL ::  cyclic_dvrp = .FALSE.                      !< internal dvr software variable
     1486    LOGICAL ::  dvrp_overlap                               !< internal dvr software variable
     1487    LOGICAL ::  dvrp_total_overlap                         !< internal dvr software variable
     1488    LOGICAL ::  local_dvrserver_running                    !< namelist parameter (ENVPAR namelist provided by mrun)
     1489    LOGICAL ::  lock_steering_update = .FALSE.             !< internal dvr software variable
     1490    LOGICAL ::  use_seperate_pe_for_dvrp_output = .FALSE.  !< internal dvr software variable
     1491
     1492    REAL(wp) ::  clip_dvrp_l = 9999999.9_wp  !< dvr namelist parameter
     1493    REAL(wp) ::  clip_dvrp_n = 9999999.9_wp  !< dvr namelist parameter
     1494    REAL(wp) ::  clip_dvrp_r = 9999999.9_wp  !< dvr namelist parameter
     1495    REAL(wp) ::  clip_dvrp_s = 9999999.9_wp  !< dvr namelist parameter
     1496    REAL(wp) ::  superelevation = 1.0_wp     !< dvr namelist parameter
     1497    REAL(wp) ::  superelevation_x = 1.0_wp   !< dvr namelist parameter
     1498    REAL(wp) ::  superelevation_y = 1.0_wp   !< dvr namelist parameter
     1499    REAL(wp) ::  vc_alpha = 38.0_wp          !< dvr namelist parameter
     1500
     1501    REAL(wp), DIMENSION(2) ::  color_interval = (/ 0.0_wp, 1.0_wp /)     !< dvr namelist parameter
     1502    REAL(wp), DIMENSION(2) ::  dvrpsize_interval = (/ 0.0_wp, 1.0_wp /)  !< dvr namelist parameter
     1503
     1504    REAL(wp), DIMENSION(3) ::  groundplate_color = (/ 0.0_wp, 0.6_wp, 0.0_wp /)  !< dvr namelist parameter
     1505    REAL(wp), DIMENSION(3) ::  topography_color = (/ 0.8_wp, 0.7_wp, 0.6_wp /)   !< dvr namelist parameter
     1506
     1507    REAL(wp), DIMENSION(2,10) ::  slicer_range_limits_dvrp  !< dvr namelist parameter
     1508
     1509    REAL(wp), DIMENSION(3,10) ::  isosurface_color  !< dvr namelist parameter
     1510
     1511    REAL(sp), DIMENSION(2,100) ::  interval_values_dvrp          !< internal dvr software variable
     1512    REAL(sp), DIMENSION(2,100) ::  interval_values_dvrp_prt      !< internal dvr software variable
     1513    REAL(sp), DIMENSION(2,100) ::  interval_h_dvrp               !< internal dvr software variable
     1514    REAL(sp), DIMENSION(2,100) ::  interval_h_dvrp_prt           !< internal dvr software variable
     1515    REAL(sp), DIMENSION(2,100) ::  interval_l_dvrp = 0.5_sp      !< internal dvr software variable
     1516    REAL(sp), DIMENSION(2,100) ::  interval_l_dvrp_prt = 0.5_sp  !< internal dvr software variable
     1517    REAL(sp), DIMENSION(2,100) ::  interval_s_dvrp = 1.0_sp      !< internal dvr software variable
     1518    REAL(sp), DIMENSION(2,100) ::  interval_s_dvrp_prt = 1.0_sp  !< internal dvr software variable
     1519    REAL(sp), DIMENSION(2,100) ::  interval_a_dvrp = 0.0_sp      !< internal dvr software variable
     1520    REAL(sp), DIMENSION(2,100) ::  interval_a_dvrp_prt = 0.0_sp  !< internal dvr software variable
     1521
     1522    DATA  slicer_range_limits_dvrp / -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &  !< internal dvr software variable
    15301523                                     -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &
    15311524                                     -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, -1.0_wp, 1.0_wp, &
    15321525                                     -1.0_wp, 1.0_wp /
    15331526
    1534     DATA  isosurface_color / 0.9_wp, 0.9_wp, 0.9_wp,  0.8_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.8_wp, &  !<
     1527    DATA  isosurface_color / 0.9_wp, 0.9_wp, 0.9_wp,  0.8_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.8_wp, &  !< internal dvr software variable
    15351528                             0.1_wp, 0.8_wp, 0.1_wp,  0.6_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.6_wp, &
    15361529                             0.1_wp, 0.6_wp, 0.1_wp,  0.4_wp, 0.1_wp, 0.1_wp,  0.1_wp, 0.1_wp, 0.4_wp, &
    15371530                             0.1_wp, 0.4_wp, 0.1_wp /
    15381531
    1539     DATA  interval_h_dvrp / 270.0_wp, 225.0_wp, 225.0_wp, 180.0_wp, 70.0_wp, 25.0_wp, &  !<
     1532    DATA  interval_h_dvrp / 270.0_wp, 225.0_wp, 225.0_wp, 180.0_wp, 70.0_wp, 25.0_wp, &  !< internal dvr software variable
    15401533                            25.0_wp, -25.0_wp, 192 * 0.0_wp /
    15411534
    1542     DATA  interval_h_dvrp_prt / 270.0_wp, 225.0_wp, 225.0_wp, 180.0_wp, 70.0_wp, 25.0_wp, &  !<
     1535    DATA  interval_h_dvrp_prt / 270.0_wp, 225.0_wp, 225.0_wp, 180.0_wp, 70.0_wp, 25.0_wp, &  !< internal dvr software variable
    15431536                                25.0_wp, -25.0_wp, 192 * 0.0_wp /
    15441537
    1545     REAL(sp), DIMENSION(:), ALLOCATABLE ::  xcoor_dvrp  !<
    1546     REAL(sp), DIMENSION(:), ALLOCATABLE ::  ycoor_dvrp  !<
    1547     REAL(sp), DIMENSION(:), ALLOCATABLE ::  zcoor_dvrp  !<
     1538    REAL(sp), DIMENSION(:), ALLOCATABLE ::  xcoor_dvrp  !< internal dvr software variable
     1539    REAL(sp), DIMENSION(:), ALLOCATABLE ::  ycoor_dvrp  !< internal dvr software variable
     1540    REAL(sp), DIMENSION(:), ALLOCATABLE ::  zcoor_dvrp  !< internal dvr software variable
    15481541
    15491542    TYPE steering
    1550        CHARACTER (LEN=24) ::  name  !<
    1551        REAL(sp)           ::  min   !<
    1552        REAL(sp)           ::  max   !<
    1553        INTEGER(iwp)       ::  imin  !<
    1554        INTEGER(iwp)       ::  imax  !<
     1543       CHARACTER (LEN=24) ::  name  !< internal dvr software variable
     1544       REAL(sp)           ::  min   !< internal dvr software variable
     1545       REAL(sp)           ::  max   !< internal dvr software variable
     1546       INTEGER(iwp)       ::  imin  !< internal dvr software variable
     1547       INTEGER(iwp)       ::  imax  !< internal dvr software variable
    15551548    END TYPE steering
    15561549
    1557     TYPE(steering), DIMENSION(:), ALLOCATABLE ::  steering_dvrp  !<
     1550    TYPE(steering), DIMENSION(:), ALLOCATABLE ::  steering_dvrp  !< internal dvr software variable
    15581551
    15591552    SAVE
     
    16051598    INTEGER(iwp) ::  nnx          !< number of subdomain grid points in x-direction
    16061599    INTEGER(iwp) ::  nx = 0       !< nx+1 = total number of grid points in x-direction
    1607     INTEGER(iwp) ::  nx_a         !< Siggi
    1608     INTEGER(iwp) ::  nx_o         !< Siggi
     1600    INTEGER(iwp) ::  nx_a         !< in coupled atmosphere-ocean runs: total number of grid points along x (atmosphere)
     1601    INTEGER(iwp) ::  nx_o         !< in coupled atmosphere-ocean runs: total number of grid points along x (ocean)
    16091602    INTEGER(iwp) ::  nxl          !< left-most grid index of subdomain (excluding ghost points)
    16101603    INTEGER(iwp) ::  nxlg         !< left-most grid index of subdomain (including ghost points)
    1611     INTEGER(iwp) ::  nxlu         !< =nxl+1 (at left domain boundary with inflow from left), else =nxl
     1604    INTEGER(iwp) ::  nxlu         !< =nxl+1 (at left domain boundary with inflow from left), else =nxl (used for u-velocity component)
    16121605    INTEGER(iwp) ::  nxr          !< right-most grid index of subdomain (excluding ghost points)
    16131606    INTEGER(iwp) ::  nxrg         !< right-most grid index of subdomain (including ghost points)
     
    16151608    INTEGER(iwp) ::  nny          !< number of subdomain grid points in y-direction
    16161609    INTEGER(iwp) ::  ny = 0       !< ny+1 = total number of grid points in y-direction
    1617     INTEGER(iwp) ::  ny_a         !< Siggi
    1618     INTEGER(iwp) ::  ny_o         !< Siggi
     1610    INTEGER(iwp) ::  ny_a         !< in coupled atmosphere-ocean runs: total number of grid points along y (atmosphere)
     1611    INTEGER(iwp) ::  ny_o         !< in coupled atmosphere-ocean runs: total number of grid points along y (ocean)
    16191612    INTEGER(iwp) ::  nyn          !< north-most grid index of subdomain (excluding ghost points)
    16201613    INTEGER(iwp) ::  nyng         !< north-most grid index of subdomain (including ghost points)
    16211614    INTEGER(iwp) ::  nys          !< south-most grid index of subdomain (excluding ghost points)
    16221615    INTEGER(iwp) ::  nysg         !< south-most grid index of subdomain (including ghost points)
    1623     INTEGER(iwp) ::  nysv         !< =nys+1 (at south domain boundary with inflow from south), else =nys
     1616    INTEGER(iwp) ::  nysv         !< =nys+1 (at south domain boundary with inflow from south), else =nys (used for v-velocity component)
    16241617    INTEGER(iwp) ::  ny_on_file   !< ny of previous run in job chain
    16251618    INTEGER(iwp) ::  nnz          !< number of subdomain grid points in z-direction
     
    16431636    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_outer     !< number of horizontal grid points which are non-topography and non-surface-bounded
    16441637    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_s_inner   !< number of horizontal grid points which are non-topography
    1645     INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mg_loc_ind        !< Siggi
     1638    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  mg_loc_ind        !< internal array to store index bounds of all PEs of that multigrid level where data is collected to PE0
    16461639    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_diff_s_inner  !< will be removed
    16471640    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  nzb_diff_s_outer  !< will be removed
     
    16931686!> @todo Missing subroutine description.
    16941687!------------------------------------------------------------------------------!
    1695        SUBROUTINE global_min_max ( i1, i2, j1, j2, k1, k2, feld, mode, offset, &
    1696                                    wert, wert_ijk, wert1, wert1_ijk )
     1688       SUBROUTINE global_min_max ( i1, i2, j1, j2, k1, k2, array, mode, offset, &
     1689                                   result, result_ijk, result1, result1_ijk )
    16971690
    16981691          USE kinds
    16991692
    1700           CHARACTER (LEN=*), INTENT(IN) ::  mode                     !< Siggi (entire module, some variables are still in German)
    1701           INTEGER(iwp), INTENT(IN)      ::  i1                       !<
    1702           INTEGER(iwp), INTENT(IN)      ::  i2                       !<
    1703           INTEGER(iwp), INTENT(IN)      ::  j1                       !<
    1704           INTEGER(iwp), INTENT(IN)      ::  j2                       !<
    1705           INTEGER(iwp), INTENT(IN)      ::  k1                       !<
    1706           INTEGER(iwp), INTENT(IN)      ::  k2                       !< 
    1707           INTEGER(iwp)                  ::  wert_ijk(3)              !<
    1708           INTEGER(iwp), OPTIONAL        ::  wert1_ijk(3)             !< 
    1709           REAL(wp)                      ::  offset                   !<
    1710           REAL(wp)                      ::  wert                     !<
    1711           REAL(wp), OPTIONAL            ::  wert1                    !<
    1712           REAL(wp), INTENT(IN)          ::  feld(i1:i2,j1:j2,k1:k2)  !<
     1693          CHARACTER (LEN=*), INTENT(IN) ::  mode                      !< mode of global min/max function: can be 'min', 'max', 'minmax', 'abs', or 'absoff'
     1694          INTEGER(iwp), INTENT(IN)      ::  i1                        !< internal index of min/max function
     1695          INTEGER(iwp), INTENT(IN)      ::  i2                        !< internal index of min/max function
     1696          INTEGER(iwp), INTENT(IN)      ::  j1                        !< internal index of min/max function
     1697          INTEGER(iwp), INTENT(IN)      ::  j2                        !< internal index of min/max function
     1698          INTEGER(iwp), INTENT(IN)      ::  k1                        !< internal index of min/max function
     1699          INTEGER(iwp), INTENT(IN)      ::  k2                        !< internal index of min/max function
     1700          INTEGER(iwp)                  ::  result_ijk(3)             !< grid index result of min/max function
     1701          INTEGER(iwp), OPTIONAL        ::  result1_ijk(3)            !< optional grid index result of min/max function
     1702          REAL(wp)                      ::  offset                    !< min/max function calculates absolute value with respect to an offset
     1703          REAL(wp)                      ::  result                    !< result of min/max function
     1704          REAL(wp), OPTIONAL            ::  result1                   !< optional result of min/max function
     1705          REAL(wp), INTENT(IN)          ::  array(i1:i2,j1:j2,k1:k2)  !< input array of min/max function
    17131706
    17141707       END SUBROUTINE global_min_max
     
    18181811! ------------
    18191812!> Definition of variables which define processor topology and the exchange of
    1820 !> ghost point layers. This modules must be placed in all routines which contain
     1813!> ghost point layers. This module must be placed in all routines containing
    18211814!> MPI-calls.
    18221815!------------------------------------------------------------------------------!
     
    18321825#endif
    18331826#endif
    1834     CHARACTER(LEN=2) ::  send_receive = 'al'     !< Siggi
     1827    CHARACTER(LEN=2) ::  send_receive = 'al'     !<
    18351828    CHARACTER(LEN=7) ::  myid_char = ''          !< character string containing processor id number
    18361829   
    1837     INTEGER(iwp) ::  comm1dx                     !< Siggi
    1838     INTEGER(iwp) ::  comm1dy                     !< Siggi
    1839     INTEGER(iwp) ::  comm2d                      !< Siggi
    1840     INTEGER(iwp) ::  comm_inter                  !< Siggi
    1841     INTEGER(iwp) ::  comm_palm                   !< Siggi
     1830    INTEGER(iwp) ::  comm1dx                     !< communicator for domain decomposition along x
     1831    INTEGER(iwp) ::  comm1dy                     !< communicator for domain decomposition along y
     1832    INTEGER(iwp) ::  comm2d                      !< standard 2d (xy) communicator used in PALM for the process group the PE belongs to
     1833    INTEGER(iwp) ::  comm_inter                  !< intercommunicator that connects atmosphere/ocean process groups
     1834    INTEGER(iwp) ::  comm_palm                   !< internal communicator used during the MPI setup at the beginning of a run
    18421835    INTEGER(iwp) ::  id_inflow = 0               !< myidx of procs at inflow (turbulent inflow method)
    18431836    INTEGER(iwp) ::  id_outflow = 0              !< myidx of procs at outflow (turbulent outflow method)
    18441837    INTEGER(iwp) ::  id_outflow_source = 0       !< myidx of procs including ouflow source plane (turbulent outflow method)
    18451838    INTEGER(iwp) ::  id_recycling = 0            !< myidx of procs containing the recycling plane (turbulence recycling method)
    1846     INTEGER(iwp) ::  ierr                        !< Siggi
     1839    INTEGER(iwp) ::  ierr                        !< standard error parameter in MPI calls
    18471840    INTEGER(iwp) ::  myid = 0                    !< id number of processor element
    18481841    INTEGER(iwp) ::  myidx = 0                   !< id number of processor elements with same position along x-direction
    18491842    INTEGER(iwp) ::  myidy = 0                   !< id number of processor elements with same position along y-direction
    1850     INTEGER(iwp) ::  ndim = 2                    !< Siggi
    1851     INTEGER(iwp) ::  ngp_a                       !< number of grid points in atmosphere domain   Siggi
    1852     INTEGER(iwp) ::  ngp_o                       !< number of grid points in ocean domain   Siggi
    1853     INTEGER(iwp) ::  ngp_xy                      !< number of grid points at atmosphere-ocean interface   Siggi   
    1854     INTEGER(iwp) ::  ngp_y                       !< Siggi
     1843    INTEGER(iwp) ::  ndim = 2                    !< dimension of the virtual PE grid
     1844    INTEGER(iwp) ::  ngp_a                       !< used in atmosphere/ocean coupling: total number of horizontal grid points (atmosphere)
     1845    INTEGER(iwp) ::  ngp_o                       !< used in atmosphere/ocean coupling: total number of horizontal grid points (ocean)
     1846    INTEGER(iwp) ::  ngp_xy                      !< used in atmosphere/ocean coupling: number of grid points of the subdomain
     1847    INTEGER(iwp) ::  ngp_y                       !< number of subdomain grid points along y including ghost points
    18551848    INTEGER(iwp) ::  npex = -1                   !< number of processor elements in x-direction
    18561849    INTEGER(iwp) ::  npey = -1                   !< number of processor elements in y-direction
     
    18621855    INTEGER(iwp) ::  psouth                      !< MPI-address of the processor south of the current one
    18631856    INTEGER(iwp) ::  req_count = 0               !< MPI return variable - checks if Send-Receive operation is already finished
    1864     INTEGER(iwp) ::  sendrecvcount_xy            !< Siggi
    1865     INTEGER(iwp) ::  sendrecvcount_yz            !< Siggi
    1866     INTEGER(iwp) ::  sendrecvcount_zx            !< Siggi
    1867     INTEGER(iwp) ::  sendrecvcount_zyd           !< Siggi
    1868     INTEGER(iwp) ::  sendrecvcount_yxd           !< Siggi
    1869     INTEGER(iwp) ::  target_id                   !< Siggi
    1870     INTEGER(iwp) ::  tasks_per_node = -9999      !< MPI tasks per computing node
    1871     INTEGER(iwp) ::  threads_per_task = 1        !< OPENMP threads per MPI task
     1857    INTEGER(iwp) ::  sendrecvcount_xy            !< number of subdomain gridpoints to be exchanged in direct transpositions (y --> x, or x --> y) or second (2d) transposition x --> y
     1858    INTEGER(iwp) ::  sendrecvcount_yz            !< number of subdomain gridpoints to be exchanged in third (2d) transposition y --> z
     1859    INTEGER(iwp) ::  sendrecvcount_zx            !< number of subdomain gridpoints to be exchanged in first (2d) transposition z --> x
     1860    INTEGER(iwp) ::  sendrecvcount_zyd           !< number of subdomain gridpoints to be exchanged in direct transpositions z --> y (used for calculating spectra)
     1861    INTEGER(iwp) ::  target_id                   !< in atmosphere/ocean coupling: id of the ocean/atmosphere counterpart PE with whom the atmosphere/ocean PE exchanges data
     1862    INTEGER(iwp) ::  tasks_per_node = -9999      !< MPI tasks per compute node
     1863    INTEGER(iwp) ::  threads_per_task = 1        !< number of OPENMP threads per MPI task
    18721864    INTEGER(iwp) ::  type_x                      !< derived MPI datatype for 2-D ghost-point exchange - north / south
    18731865    INTEGER(iwp) ::  type_xy                     !< derived MPI datatype for 2-D ghost-point exchange - north / south
     
    18801872    INTEGER(iwp), DIMENSION(:,:), ALLOCATABLE ::  hor_index_bounds_previous_run  !< horizontal index bounds of previous run
    18811873
    1882     LOGICAL ::  collective_wait = .FALSE.          !< Siggi
    1883     LOGICAL ::  sendrecv_in_background = .FALSE.   !< Siggi
     1874    LOGICAL ::  collective_wait = .FALSE.          !< switch to set an explicit MPI barrier in front of all collective MPI calls
    18841875
    18851876#if defined( __parallel )
    1886 #if defined( __mpi2 )
    1887     CHARACTER (LEN=MPI_MAX_PORT_NAME) ::  port_name  !< Siggi
    1888 #endif
    1889 
    1890     INTEGER(iwp) ::  ibuf(12)                 !< Siggi
    1891     INTEGER(iwp) ::  pcoord(2)                !< Siggi
    1892     INTEGER(iwp) ::  status(MPI_STATUS_SIZE)  !< Siggi
     1877    INTEGER(iwp) ::  ibuf(12)                 !< internal buffer for calculating MPI settings
     1878    INTEGER(iwp) ::  pcoord(2)                !< PE coordinates along x and y
     1879    INTEGER(iwp) ::  status(MPI_STATUS_SIZE)  !< MPI status variable used in various MPI calls
    18931880   
    1894     INTEGER(iwp), DIMENSION(MPI_STATUS_SIZE,100) ::  wait_stat  !< Siggi
     1881    INTEGER(iwp), DIMENSION(MPI_STATUS_SIZE,100) ::  wait_stat  !< MPI status variable used in various MPI calls
    18951882   
    18961883    INTEGER(iwp) ::  ngp_yz_int   !< number of ghost points in yz-plane
     
    19071894    LOGICAL ::  left_border_pe  = .FALSE.  !< = .TRUE. if PE is on left border of computational domain
    19081895    LOGICAL ::  north_border_pe = .FALSE.  !< = .TRUE. if PE is on north border of computational domain
    1909     LOGICAL ::  reorder = .TRUE.           !< Siggi
     1896    LOGICAL ::  reorder = .TRUE.           !< switch to allow MPI the reorder of ranking (e.g. row-major or column-major)
    19101897    LOGICAL ::  right_border_pe = .FALSE.  !< = .TRUE. if PE is on right border of computational domain
    19111898    LOGICAL ::  south_border_pe = .FALSE.  !< = .TRUE. if PE is on south border of computational domain
    19121899
    1913     LOGICAL, DIMENSION(2) ::  cyclic = (/ .TRUE. , .TRUE. /)  !< Siggi
    1914     LOGICAL, DIMENSION(2) ::  remain_dims                     !< Siggi
     1900    LOGICAL, DIMENSION(2) ::  cyclic = (/ .TRUE. , .TRUE. /)  !< boundary conditions of the virtual PE grid
     1901    LOGICAL, DIMENSION(2) ::  remain_dims                     !< internal array used to determine sub-topologies for transpositions
    19151902#endif
    19161903
     
    19291916    USE kinds
    19301917
    1931     INTEGER(iwp), PARAMETER ::  crmax = 100  !< Siggi (entire module)
    1932 
    1933     CHARACTER (LEN=20), DIMENSION(20) ::  cross_ts_profiles = &  !<
     1918    INTEGER(iwp), PARAMETER ::  crmax = 100  !< maximum number of coordinate systems for profile output
     1919
     1920    CHARACTER (LEN=20), DIMENSION(20) ::  cross_ts_profiles = &  !< time series to be plotted into one coordinate system, respectively
    19341921                           (/ ' E E*               ', ' dt                 ', &
    19351922                              ' u* w*              ', ' th*                ', &
     
    19401927                            ( '                    ', i9 = 1, 9 ) /)
    19411928
    1942     CHARACTER (LEN=100), DIMENSION(crmax) ::  cross_profiles = &  !<
     1929    CHARACTER (LEN=100), DIMENSION(crmax) ::  cross_profiles = &  !< quantities to be plotted into one coordinate system, respectively
    19431930                           (/ ' u v                           ', &
    19441931                              ' pt                            ', &
     
    19491936                         ( '                               ', i9 = 1, 94 ) /)
    19501937
    1951     INTEGER(iwp) ::  profile_columns = 2  !<
    1952     INTEGER(iwp) ::  profile_rows = 3     !<
    1953     INTEGER(iwp) ::  profile_number = 0   !<
    1954 
    1955     INTEGER(iwp) ::  cross_ts_numbers(crmax,crmax) = 0  !<
    1956     INTEGER(iwp) ::  cross_ts_number_count(crmax) = 0   !<
    1957     INTEGER(iwp) ::  dopr_index(300) = 0                !<
    1958     INTEGER(iwp) ::  dopr_initial_index(300) = 0        !<
    1959     INTEGER(iwp) ::  dots_crossindex(100) = 0           !<
    1960     INTEGER(iwp) ::  dots_index(100) = 0                !<
     1938    INTEGER(iwp) ::  profile_columns = 2  !< number of coordinate systems on a profile plot per column
     1939    INTEGER(iwp) ::  profile_rows = 3     !< number of coordinate systems on a profile plot per row
     1940
     1941    INTEGER(iwp) ::  dopr_index(300) = 0                !< index number of respective profile quantity
     1942    INTEGER(iwp) ::  dopr_initial_index(300) = 0        !< index number of initial profiles to be output
    19611943               
    1962 
    1963     REAL(wp) ::  cross_ts_uymax(20) = &                    !<
    1964                              (/ 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp,   &
    1965                                 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp,   &
    1966                                 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp,   &
    1967                                 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp /)
    1968     REAL(wp) ::  cross_ts_uymax_computed(20) = 999.999_wp  !<
    1969     REAL(wp) ::  cross_ts_uymin(20) = &                    !<
    1970                              (/ 999.999_wp, 999.999_wp, 999.999_wp,  -5.000_wp, 999.999_wp,   &
    1971                                 999.999_wp,   0.000_wp, 999.999_wp, 999.999_wp, 999.999_wp,   &
    1972                                 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp,   &
    1973                                 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp, 999.999_wp /)
    1974     REAL(wp) ::  cross_ts_uymin_computed(20) = 999.999_wp  !<
    1975 
    19761944    SAVE
    19771945
     
    20031971    REAL(wp) ::  w_max  !< maximum of absolute w-veloctiy in entire domain
    20041972   
    2005     REAL(wp), DIMENSION(:), ALLOCATABLE ::  mean_surface_level_height  !< Siggi
     1973    REAL(wp), DIMENSION(:), ALLOCATABLE ::  mean_surface_level_height  !< mean surface level height for the different statistic regions
    20061974    REAL(wp), DIMENSION(:), ALLOCATABLE ::  sums_divnew_l              !< subdomain sum (_l) of divergence after pressure
    20071975                                                                       !< solver call (new)
     
    20512019    USE kinds
    20522020
    2053     INTEGER(iwp) ::  nxl_y   !< Siggi (entire module)
    2054     INTEGER(iwp) ::  nxl_yd  !<
    2055     INTEGER(iwp) ::  nxl_z   !<
    2056     INTEGER(iwp) ::  nxr_y   !<
    2057     INTEGER(iwp) ::  nxr_yd  !<
    2058     INTEGER(iwp) ::  nxr_z   !<
    2059     INTEGER(iwp) ::  nyn_x   !<
    2060     INTEGER(iwp) ::  nyn_z   !<
    2061     INTEGER(iwp) ::  nys_x   !<
    2062     INTEGER(iwp) ::  nys_z   !<
    2063     INTEGER(iwp) ::  nzb_x   !<
    2064     INTEGER(iwp) ::  nzb_y   !<
    2065     INTEGER(iwp) ::  nzb_yd  !<
    2066     INTEGER(iwp) ::  nzt_x   !<
    2067     INTEGER(iwp) ::  nzt_y   !<
    2068     INTEGER(iwp) ::  nzt_yd  !<
     2021    INTEGER(iwp) ::  nxl_y   !< internal index bound for transpositions
     2022    INTEGER(iwp) ::  nxl_yd  !< internal index bound for transpositions
     2023    INTEGER(iwp) ::  nxl_z   !< internal index bound for transpositions
     2024    INTEGER(iwp) ::  nxr_y   !< internal index bound for transpositions
     2025    INTEGER(iwp) ::  nxr_yd  !< internal index bound for transpositions
     2026    INTEGER(iwp) ::  nxr_z   !< internal index bound for transpositions
     2027    INTEGER(iwp) ::  nyn_x   !< internal index bound for transpositions
     2028    INTEGER(iwp) ::  nyn_z   !< internal index bound for transpositions
     2029    INTEGER(iwp) ::  nys_x   !< internal index bound for transpositions
     2030    INTEGER(iwp) ::  nys_z   !< internal index bound for transpositions
     2031    INTEGER(iwp) ::  nzb_x   !< internal index bound for transpositions
     2032    INTEGER(iwp) ::  nzb_y   !< internal index bound for transpositions
     2033    INTEGER(iwp) ::  nzb_yd  !< internal index bound for transpositions
     2034    INTEGER(iwp) ::  nzt_x   !< internal index bound for transpositions
     2035    INTEGER(iwp) ::  nzt_y   !< internal index bound for transpositions
     2036    INTEGER(iwp) ::  nzt_yd  !< internal index bound for transpositions
    20692037               
    20702038    SAVE
Note: See TracChangeset for help on using the changeset viewer.