Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 1692)
+++ palm/trunk/SOURCE/parin.f90	(revision 1762)
@@ -19,5 +19,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Introduction of nested domain feature
 ! 
 ! Former revisions:
@@ -176,81 +176,5 @@
                limiter_sedimentation, nc_const, ventilation_effect
 
-    USE control_parameters,                                                    &
-        ONLY:  alpha_surface, averaging_interval, averaging_interval_pr,       &
-               bc_e_b, bc_lr, bc_ns, bc_p_b, bc_p_t, bc_pt_b, bc_pt_t,         &
-               bc_q_b, bc_q_t,bc_s_b, bc_s_t, bc_sa_t, bc_uv_b, bc_uv_t,       &
-               bottom_salinityflux, building_height, building_length_x,        &
-               building_length_y, building_wall_left, building_wall_south,     &
-               call_microphysics_at_all_substeps, call_psolver_at_all_substeps,&
-               canyon_height,                                                  &
-               canyon_width_x, canyon_width_y, canyon_wall_left,               &
-               canyon_wall_south, cfl_factor,                                  &
-               cloud_droplets, cloud_physics, cloud_scheme,                    &
-               cloud_top_radiation, conserve_volume_flow,                      &
-               conserve_volume_flow_mode, constant_flux_layer,                 &
-               coupling_start_time,                                            &
-               create_disturbances, cycle_mg, data_output, data_output_masks,  &
-               data_output_pr, data_output_2d_on_each_pe,                      &
-               disturbance_amplitude, disturbance_energy_limit,                &
-               disturbance_level_b, disturbance_level_t, dissipation_1d,       &
-               do2d_at_begin, do3d_at_begin,                                   &
-               dp_external, dp_level_b, dp_smooth, dpdxy,                      &
-               drizzle, dt, dt_averaging_input, dt_averaging_input_pr,         &
-               dt_coupling, dt_data_output, dt_data_output_av, dt_disturb,     &
-               dt_domask, dt_dopr, dt_dopr_listing, dt_dots, dt_do2d_xy,       &
-               dt_do2d_xz, dt_do2d_yz, dt_do3d, dt_max, dt_restart,            &
-               dt_run_control, dz, dz_max, dz_stretch_factor, dz_stretch_level,&
-               end_time, ensemble_member_nr, e_init, e_min, fft_method,        &
-               force_print_header,                                             &
-               galilei_transformation, host, humidity, inflow_damping_height,  &
-               inflow_damping_width, inflow_disturbance_begin,                 &
-               inflow_disturbance_end,  initializing_actions, io_blocks,       &
-               io_group, km_constant,                                          &
-               large_scale_forcing,                                            &
-               large_scale_subsidence,                                         &
-               loop_optimization, masking_method, mask_scale_x, mask_scale_y,  &
-               mask_scale_z, mask_x, mask_y, mask_z, mask_x_loop,              &
-               mask_y_loop, mask_z_loop, maximum_cpu_time_allowed,             &
-               maximum_parallel_io_streams, max_pr_user, message_string,       &
-               mg_cycles, mg_switch_to_pe0_level, mixing_length_1d,            &
-               momentum_advec, most_method, netcdf_data_format,                &
-               netcdf_precision, neutral, ngsrb, normalizing_region, nsor,     &
-               nsor_ini, nudging, ocean,                                       &
-               omega, omega_sor, passive_scalar, phi, nz_do3d,                 &
-               prandtl_number, precipitation,                                  &
-               precipitation_amount_interval, psolver, pt_damping_factor,      &
-               pt_damping_width, pt_reference, pt_surface,                     &
-               pt_surface_initial_change, pt_vertical_gradient,                &
-               pt_vertical_gradient_level, q_surface,                          &
-               q_surface_initial_change, q_vertical_gradient,                  &
-               q_vertical_gradient_level, random_generator,                    &
-               random_heatflux, rayleigh_damping_factor,                       &
-               rayleigh_damping_height, recycling_width, recycling_yshift,     &
-               reference_state, residual_limit,                                &
-               restart_time, return_addres, return_username,                   &
-               revision, roughness_length, runnr,                              &
-               run_identifier, sa_surface, sa_vertical_gradient,               &
-               sa_vertical_gradient_level, scalar_advec,                       &
-               scalar_rayleigh_damping,                                        &
-               section_xy, section_xz, section_yz, skip_time_data_output,      &
-               skip_time_data_output_av, skip_time_dopr, skip_time_do2d_xy,    &
-               skip_time_do2d_xz, skip_time_do2d_yz, skip_time_do3d,           &
-               skip_time_domask, subs_vertical_gradient,                       &
-               subs_vertical_gradient_level, surface_heatflux,                 &
-               surface_pressure, surface_scalarflux, surface_waterflux,        &
-               synchronous_exchange,s_surface, s_surface_initial_change,       &
-               s_vertical_gradient, s_vertical_gradient_level,                 &
-               termination_time_needed, timestep_scheme, topography,           &
-               topography_grid_convention, top_heatflux,  top_momentumflux_u,  &
-               top_momentumflux_v, top_salinityflux,                           &
-               transpose_compute_overlap, turbulence, turbulent_inflow,        &
-               ug_surface, ug_vertical_gradient, ug_vertical_gradient_level,   &
-               use_subsidence_tendencies, use_surface_fluxes, use_cmax,        &
-               use_top_fluxes, use_ug_for_galilei_tr, use_upstream_for_tke,    &
-               uv_heights, u_bulk, u_profile, vg_surface, vg_vertical_gradient,&
-               vg_vertical_gradient_level, v_bulk, v_profile,                  &
-               wall_adjustment, wall_heatflux, wall_humidityflux,              &
-               wall_scalarflux, write_binary, zeta_max, zeta_min, z0h_factor,  &
-               z_max_do2d
+    USE control_parameters
 
     USE cpulog,                                                                &
@@ -418,4 +342,26 @@
           READ ( 11, inipar, ERR=10, END=11 )
 
+#if defined ( PMC_ACTIVE )
+!
+!--       In nested domains, npex or npey must not be given in \$inipar
+!--       because here the PE-grids are always defined in the nestpar-NAMELIST
+          IF ( ( npex /= -1 ) .OR. ( npey /= -1 ) )  THEN
+             message_string = 'npex or npey must not be given in \$inipar ' // &
+                              'in nested domains'
+             CALL message( 'parin', 'PAXXXX', 1, 2, 0, 6, 0 )
+          ENDIF
+#else
+!
+!--       Make sure that no nesting boundary conditions are defined if
+!--       PMC_ACTIVE is not defined. Otherwise initiate abort.
+          IF ( ( bc_lr == 'nested' ) .OR. ( bc_ns == 'nested' ) .OR. ( bc_uv_t == 'nested' ) .OR. &
+               ( bc_pt_t ==  'nested' ) .OR. ( bc_q_t == 'nested') .OR. ( bc_sa_t == 'nested') .OR. &
+               ( bc_p_t == 'nested' ) ) THEN
+             message_string = 'Nested boundary conditions are not allowed ' // &
+                              'since the cpp flag PMC_ACTIVE is not set'
+             CALL message( 'parin', 'PAXXXX', 1, 2, 0, 6, 0 )
+          ENDIF
+#endif
+
 #if defined ( __check )
 !
