Index: palm/trunk/SOURCE/check_open.f90
===================================================================
--- palm/trunk/SOURCE/check_open.f90	(revision 597)
+++ palm/trunk/SOURCE/check_open.f90	(revision 600)
@@ -4,5 +4,6 @@
 ! Current revisions:
 ! -----------------
-! 
+! Bugfix in opening of cross section netcdf-files (parallel opening with
+! netcdf4 only works for netcdf_data_format > 2)
 !
 ! Former revisions:
@@ -723,10 +724,12 @@
 !
 !--          Open an existing NetCDF file for output
+             IF ( netcdf_data_format < 3 )  THEN
+                nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xy(av) )
+             ELSE
 #if defined( __netcdf4 )
-             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xy(av), &
-                                  COMM = comm2d, INFO = MPI_INFO_NULL )
-#else
-             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xy(av) )
-#endif
+                nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xy(av), &
+                                     COMM = comm2d, INFO = MPI_INFO_NULL )
+#endif
+             ENDIF
 
              CALL handle_netcdf_error( 'check_open', 20 )
@@ -817,11 +820,14 @@
           IF ( netcdf_extend )  THEN
 !
-!--          Open an existing NetCDF file for output 
+!--          Open an existing NetCDF file for output
+             IF ( netcdf_data_format < 3 )  THEN
+                nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xz(av) )
+             ELSE
 #if defined( __netcdf4 )
-             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xz(av), &
-                                  COMM = comm2d, INFO = MPI_INFO_NULL )
-#else
-             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xz(av) )
-#endif
+                nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_xz(av), &
+                                     COMM = comm2d, INFO = MPI_INFO_NULL )
+#endif
+             ENDIF
+
              CALL handle_netcdf_error( 'check_open', 23 )
 !
@@ -911,11 +917,14 @@
           IF ( netcdf_extend )  THEN
 !
-!--          Open an existing NetCDF file for output 
+!--          Open an existing NetCDF file for output
+             IF ( netcdf_data_format < 3 )  THEN 
+                nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_yz(av) )
+             ELSE
 #if defined( __netcdf4 )
-             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_yz(av), &
-                                  COMM = comm2d, INFO = MPI_INFO_NULL )
-#else
-             nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_yz(av) )
-#endif
+                nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_yz(av), &
+                                     COMM = comm2d, INFO = MPI_INFO_NULL )
+#endif
+             ENDIF
+
              CALL handle_netcdf_error( 'check_open', 26 )
 !
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 597)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 600)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! change due to new default value of surface_waterflux
 !
 ! Former revisions:
@@ -1368,5 +1368,5 @@
        ENDIF
 
-       IF ( surface_waterflux == 0.0 )  constant_waterflux = .FALSE.
+       IF ( surface_waterflux == 9999999.9 )  constant_waterflux = .FALSE.
 
 !
Index: palm/trunk/SOURCE/modules.f90
===================================================================
--- palm/trunk/SOURCE/modules.f90	(revision 597)
+++ palm/trunk/SOURCE/modules.f90	(revision 600)
@@ -5,5 +5,6 @@
 ! Current revisions:
 ! -----------------
-! 
+! default values of surface_scalarflux and surface_waterflux changed
+! to 9999999.9
 !
 ! Former revisions:
@@ -512,5 +513,5 @@
              skip_time_do2d_yz = 9999999.9, skip_time_do3d = 9999999.9, &
              surface_heatflux = 9999999.9, surface_pressure = 1013.25, &
-             surface_scalarflux = 0.0, surface_waterflux = 0.0, &
+             surface_scalarflux = 9999999.9, surface_waterflux = 9999999.9, &
              s_surface = 0.0, s_surface_initial_change = 0.0, &
              termination_time_needed = -1.0, time_coupling = 0.0, &
Index: palm/trunk/SOURCE/netcdf.f90
===================================================================
--- palm/trunk/SOURCE/netcdf.f90	(revision 597)
+++ palm/trunk/SOURCE/netcdf.f90	(revision 600)
@@ -7,5 +7,6 @@
 ! Current revisions:
 ! ------------------
-!
+! Bugfix concerning check of cross-section levels on netcdf-files to be
+! extended (xz,yz)
 !
 ! Former revisions:
@@ -2241,5 +2242,5 @@
 
 !
-!--       Write yv_xz data 
+!--       Write yv_xz data
           DO  i = 1, ns
              IF( section(i,2) == -1 )  THEN
@@ -2387,5 +2388,5 @@
           DO  i = 1, ns
              IF ( section(i,2) /= -1 )  THEN
-                IF ( ( section(i,2) * dy ) /= netcdf_data(i) )  THEN
+                IF ( ( ( section(i,2) + 0.5 ) * dy ) /= netcdf_data(i) )  THEN
                    message_string = 'NetCDF file for cross-sections ' //     &
                                TRIM( var ) // ' from previous run found,' // &
@@ -2971,5 +2972,5 @@
           DO  i = 1, ns
              IF ( section(i,3) /= -1 )  THEN
-                IF ( ( section(i,3) * dx ) /= netcdf_data(i) )  THEN
+                IF ( ( ( section(i,3) + 0.5 ) * dx ) /= netcdf_data(i) )  THEN
                    message_string = 'NetCDF file for cross-sections ' //    &
                               TRIM( var ) // ' from previous run found,' // &
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 597)
+++ palm/trunk/SOURCE/parin.f90	(revision 600)
@@ -4,5 +4,8 @@
 ! Current revisions:
 ! -----------------
-! 
+! parameters moved from d3par to inipar: call_psolver_at_all_substeps,
+! cfl_factor, cycle_mg, mg_cycles, mg_switch_to_pe0_level, ngsrb, nsor,
+! omega_sor, prandtl_number, psolver, rayleigh_damping_factor,
+! rayleigh_damping_height, residual_limit
 !
 ! Former revisions:
@@ -110,9 +113,10 @@
              bottom_salinityflux, building_height, building_length_x, &
              building_length_y, building_wall_left, building_wall_south, &
-             canopy_mode, canyon_height, canyon_width_x, canyon_width_y, &
-             canyon_wall_left, canyon_wall_south, cloud_droplets, &
-             cloud_physics, conserve_volume_flow, conserve_volume_flow_mode, &
+             call_psolver_at_all_substeps, canopy_mode, canyon_height, &
+             canyon_width_x, canyon_width_y, canyon_wall_left, &
+             canyon_wall_south, cfl_factor, cloud_droplets, cloud_physics, &
+             conserve_volume_flow, conserve_volume_flow_mode, &
              coupling_start_time, cthf, cut_spline_overshoot, &
-             damp_level_1d, dissipation_1d, dp_external, dp_level_b, &
+             cycle_mg, damp_level_1d, dissipation_1d, dp_external, dp_level_b, &
              dp_smooth, dpdxy, drag_coefficient, dt, dt_pr_1d, &
              dt_run_control_1d, dx, dy, dz, dz_max, dz_stretch_factor, & 
@@ -124,66 +128,56 @@
              lad_vertical_gradient, lad_vertical_gradient_level, &
              leaf_surface_concentration, long_filter_factor, &
-             loop_optimization, mixing_length_1d, momentum_advec, &
-             netcdf_precision, nsor_ini, nx, ny, &
-             nz, ocean, omega, outflow_damping_width, overshoot_limit_e, &
-             overshoot_limit_pt, overshoot_limit_u, overshoot_limit_v, &
-             overshoot_limit_w, passive_scalar, pch_index, phi, &  
-             plant_canopy, prandtl_layer, precipitation, pt_reference, &
-             pt_surface, pt_surface_initial_change, pt_vertical_gradient, &
+             loop_optimization, mg_cycles, mg_switch_to_pe0_level, &
+             mixing_length_1d, momentum_advec, netcdf_precision, ngsrb, nsor, &
+             nsor_ini, nx, ny, nz, ocean, omega, omega_sor, &
+             outflow_damping_width, overshoot_limit_e, overshoot_limit_pt, &
+             overshoot_limit_u, overshoot_limit_v, overshoot_limit_w, &
+             passive_scalar, pch_index, phi, plant_canopy, prandtl_layer, &
+             prandtl_number, precipitation, psolver, 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, radiation, &
-             random_generator, random_heatflux, recycling_width, rif_max, &
-             rif_min, roughness_length, sa_surface, sa_vertical_gradient, &
-             sa_vertical_gradient_level, scalar_advec, &
+             random_generator, random_heatflux, rayleigh_damping_factor, &
+             rayleigh_damping_height, recycling_width, residual_limit, &
+             rif_max, rif_min, roughness_length, sa_surface, &
+             sa_vertical_gradient, sa_vertical_gradient_level, scalar_advec, &
              scalar_exchange_coefficient, statistic_regions, &
+             subs_vertical_gradient, subs_vertical_gradient_level, &
              surface_heatflux, surface_pressure, surface_scalarflux, &
              surface_waterflux, s_surface, s_surface_initial_change, &
              s_vertical_gradient, s_vertical_gradient_level, timestep_scheme, &
              topography, topography_grid_convention, top_heatflux, &
-             top_momentumflux_u, top_momentumflux_v, &
-             top_salinityflux, turbulent_inflow, ug_surface, &
-             ug_vertical_gradient, ug_vertical_gradient_level, u_bulk, &
-             ups_limit_e, ups_limit_pt, ups_limit_u, ups_limit_v, ups_limit_w, &
-             use_surface_fluxes, use_top_fluxes, use_ug_for_galilei_tr, &
-             use_upstream_for_tke, vg_surface, vg_vertical_gradient, &
-             vg_vertical_gradient_level, v_bulk, wall_adjustment, &
-             wall_heatflux, wall_humidityflux, wall_scalarflux, &
-             subs_vertical_gradient, subs_vertical_gradient_level
-
-
-    NAMELIST /d3par/   averaging_interval,  averaging_interval_pr, &
-                       call_psolver_at_all_substeps, cfl_factor, &
-                       create_disturbances, cross_normalized_x, &
-                       cross_normalized_y, cross_profiles, cross_ts_uymax, &
-                       cross_ts_uymin, cross_xtext, cycle_mg, data_output, &
-                       data_output_format, &
-                       data_output_masks, &
-                       data_output_pr, &
-                       data_output_2d_on_each_pe, disturbance_amplitude, &
-                       disturbance_energy_limit, disturbance_level_b, &
-                       disturbance_level_t, do2d_at_begin, do3d_at_begin, &
-                       do3d_compress, do3d_comp_prec, 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,&
-                       end_time, force_print_header, &
-                       mask_scale_x, mask_scale_y, mask_scale_z, &
-                       mask_x, mask_y, mask_z,  &
-                       mask_x_loop, mask_y_loop, mask_z_loop, &
-                       mg_cycles, mg_switch_to_pe0_level, &
-                       netcdf_data_format, &
-                       ngsrb, normalizing_region, npex, npey, nsor, nz_do3d, &
-                       omega_sor, &
-                       prandtl_number, precipitation_amount_interval, &
-                       profile_columns, profile_rows, psolver, &
-                       rayleigh_damping_factor, rayleigh_damping_height, &
-                       residual_limit, restart_time, 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, &
-                       termination_time_needed, use_prior_plot1d_parameters, &
-                       z_max_do1d, z_max_do1d_normalized, z_max_do2d
+             top_momentumflux_u, top_momentumflux_v, top_salinityflux, &
+             turbulent_inflow, ug_surface, ug_vertical_gradient, &
+             ug_vertical_gradient_level, u_bulk, ups_limit_e, ups_limit_pt, &
+             ups_limit_u, ups_limit_v, ups_limit_w, use_surface_fluxes, &
+             use_top_fluxes, use_ug_for_galilei_tr, use_upstream_for_tke, &
+             vg_surface, vg_vertical_gradient, vg_vertical_gradient_level, &
+             v_bulk, wall_adjustment, wall_heatflux, wall_humidityflux, &
+             wall_scalarflux
+
+
+    NAMELIST /d3par/  averaging_interval, averaging_interval_pr, &
+             create_disturbances, cross_normalized_x, cross_normalized_y, &
+             cross_profiles, cross_ts_uymax, cross_ts_uymin, cross_xtext, &
+             data_output, data_output_format, data_output_masks, &
+             data_output_pr, data_output_2d_on_each_pe, disturbance_amplitude, &
+             disturbance_energy_limit, disturbance_level_b, &
+             disturbance_level_t, do2d_at_begin, do3d_at_begin, do3d_compress, &
+             do3d_comp_prec, 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,end_time, force_print_header, mask_scale_x, &
+             mask_scale_y, mask_scale_z, mask_x, mask_y, mask_z, mask_x_loop, &
+             mask_y_loop, mask_z_loop, netcdf_data_format, &
+             normalizing_region, npex, npey, nz_do3d, &
+             precipitation_amount_interval, profile_columns, profile_rows, &
+             restart_time, 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, termination_time_needed, &
+             use_prior_plot1d_parameters, z_max_do1d, z_max_do1d_normalized, &
+             z_max_do2d
 
 
Index: palm/trunk/SOURCE/read_var_list.f90
===================================================================
--- palm/trunk/SOURCE/read_var_list.f90	(revision 597)
+++ palm/trunk/SOURCE/read_var_list.f90	(revision 600)
@@ -3,6 +3,12 @@
 !------------------------------------------------------------------------------!
 ! Current revisions:
-! -----------------
-! remove print command
+! -----------------_
+! +call_psolver_at_all_substeps, cfl_factor, cycle_mg, mg_cycles,
+! mg_switch_to_pe0_level, ngsrb, nsor, omega_sor, psolver,
+! rayleigh_damping_factor, rayleigh_damping_height, residual_limit
+! in routine skip_var_list (end of this file), variable ldum is replaced
+! by cdum(LEN=1), because otherwise read errors (too few data on file)
+! appear due to one of the additional parameters (cycle_mg) which are now
+! stored on the restart file
 !
 ! Former revisions:
@@ -107,5 +113,5 @@
 !-- Make version number check first
     READ ( 13 )  version_on_file
-    binary_version = '3.4'
+    binary_version = '3.5'
     IF ( TRIM( version_on_file ) /= TRIM( binary_version ) )  THEN
        WRITE( message_string, * ) 'version mismatch concerning control ', &
@@ -246,4 +252,6 @@
           CASE ( 'building_wall_south' )
              READ ( 13 )  building_wall_south
+          CASE ( 'call_psolver_at_all_substeps' )
+             READ ( 13 )  call_psolver_at_all_substeps
           CASE ( 'canopy_mode' )
              READ ( 13 )  canopy_mode
@@ -258,4 +266,6 @@
           CASE ( 'canyon_wall_south' )
              READ ( 13 )  canyon_wall_south
+          CASE ( 'cfl_factor' )
+             READ ( 13 )  cfl_factor
           CASE ( 'cloud_droplets' )
              READ ( 13 )  cloud_droplets
@@ -274,4 +284,6 @@
           CASE ( 'cut_spline_overshoot' )
              READ ( 13 )  cut_spline_overshoot
+          CASE ( 'cycle_mg' )
+             READ ( 13 )  cycle_mg
           CASE ( 'damp_level_1d' )
              READ ( 13 )  damp_level_1d
@@ -374,4 +386,8 @@
              ENDIF
              READ ( 13 )  mean_inflow_profiles
+          CASE ( 'mg_cycles' )
+             READ ( 13 )  mg_cycles
+          CASE ( 'mg_switch_to_pe0_level' )
+             READ ( 13 )  mg_switch_to_pe0_level
           CASE ( 'mixing_length_1d' )
              READ ( 13 )  mixing_length_1d
@@ -380,4 +396,8 @@
           CASE ( 'netcdf_precision' )
              READ ( 13 )  netcdf_precision
+          CASE ( 'ngsrb' )
+             READ ( 13 )  ngsrb
+          CASE ( 'nsor' )
+             READ ( 13 )  nsor
           CASE ( 'nsor_ini' )
              READ ( 13 )  nsor_ini
@@ -394,4 +414,6 @@
           CASE ( 'omega' )
              READ ( 13 )  omega
+          CASE ( 'omega_sor' )
+             READ ( 13 )  omega_sor
           CASE ( 'outflow_damping_width' )
              READ ( 13 )  outflow_damping_width
@@ -418,6 +440,10 @@
           CASE ( 'prandtl_layer' )
              READ ( 13 )  prandtl_layer
+          CASE ( 'prandtl_number' )
+             READ ( 13 )  prandtl_number
           CASE ( 'precipitation' )
              READ ( 13 ) precipitation
+          CASE ( 'psolver' )
+             READ ( 13 )  psolver
           CASE ( 'pt_init' )
              READ ( 13 )  pt_init
@@ -452,6 +478,12 @@
           CASE ( 'random_heatflux' )
              READ ( 13 )  random_heatflux
+          CASE ( 'rayleigh_damping_factor' )
+             READ ( 13 )  rayleigh_damping_factor
+          CASE ( 'rayleigh_damping_height' )
+             READ ( 13 )  rayleigh_damping_height
           CASE ( 'recycling_width' )
              READ ( 13 )  recycling_width
+          CASE ( 'residual_limit' )
+             READ ( 13 )  residual_limit
           CASE ( 'rif_max' )
              READ ( 13 )  rif_max
@@ -832,5 +864,5 @@
     CHARACTER (LEN=30) ::  variable_chr
 
-    INTEGER ::  idum
+    CHARACTER (LEN=1) ::  cdum
 
 
@@ -849,5 +881,5 @@
     WRITE (9,*) 'skipvl chr = ', variable_chr
     CALL local_flush( 9 )
-       READ ( 13 )  idum
+       READ ( 13 )  cdum
        READ ( 13 )  variable_chr
 
Index: palm/trunk/SOURCE/write_var_list.f90
===================================================================
--- palm/trunk/SOURCE/write_var_list.f90	(revision 597)
+++ palm/trunk/SOURCE/write_var_list.f90	(revision 600)
@@ -3,6 +3,8 @@
 !------------------------------------------------------------------------------!
 ! Current revisions:
-! ----------------- 
-!
+! -----------------
+! +call_psolver_at_all_substeps, cfl_factor, cycle_mg, mg_cycles,
+! mg_switch_to_pe0_level, ngsrb, nsor, omega_sor, psolver,
+! rayleigh_damping_factor, rayleigh_damping_height, residual_limit
 !
 ! Former revisions:
@@ -96,5 +98,5 @@
 
 
-    binary_version = '3.4'
+    binary_version = '3.5'
 
     WRITE ( 14 )  binary_version
@@ -175,4 +177,6 @@
     WRITE ( 14 )  'building_wall_south           '
     WRITE ( 14 )  building_wall_south
+    WRITE ( 14 )  'call_psolver_at_all_substeps  '
+    WRITE ( 14 )  call_psolver_at_all_substeps
     WRITE ( 14 )  'canopy_mode                   '
     WRITE ( 14 )  canopy_mode
@@ -187,4 +191,6 @@
     WRITE ( 14 )  'canyon_wall_south             '
     WRITE ( 14 )  canyon_wall_south
+    WRITE ( 14 )  'cfl_factor                    '
+    WRITE ( 14 )  cfl_factor
     WRITE ( 14 )  'cloud_droplets                '
     WRITE ( 14 )  cloud_droplets
@@ -203,4 +209,6 @@
     WRITE ( 14 )  'cut_spline_overshoot          '
     WRITE ( 14 )  cut_spline_overshoot
+    WRITE ( 14 )  'cycle_mg                      '
+    WRITE ( 14 )  cycle_mg
     WRITE ( 14 )  'damp_level_1d                 '
     WRITE ( 14 )  damp_level_1d
@@ -295,4 +303,8 @@
        WRITE ( 14 )  mean_inflow_profiles
     ENDIF
+    WRITE ( 14 )  'mg_cycles                     '
+    WRITE ( 14 )  mg_cycles
+    WRITE ( 14 )  'mg_switch_to_pe0_level        '
+    WRITE ( 14 )  mg_switch_to_pe0_level
     WRITE ( 14 )  'mixing_length_1d              '
     WRITE ( 14 )  mixing_length_1d
@@ -301,4 +313,8 @@
     WRITE ( 14 )  'netcdf_precision              '
     WRITE ( 14 )  netcdf_precision
+    WRITE ( 14 )  'ngsrb                         '
+    WRITE ( 14 )  ngsrb
+    WRITE ( 14 )  'nsor                          '
+    WRITE ( 14 )  nsor
     WRITE ( 14 )  'nsor_ini                      '
     WRITE ( 14 )  nsor_ini
@@ -313,4 +329,6 @@
     WRITE ( 14 )  'omega                         '
     WRITE ( 14 )  omega
+    WRITE ( 14 )  'omega_sor                     '
+    WRITE ( 14 )  omega_sor
     WRITE ( 14 )  'outflow_damping_width         '
     WRITE ( 14 )  outflow_damping_width
@@ -337,6 +355,10 @@
     WRITE ( 14 )  'prandtl_layer                 '
     WRITE ( 14 )  prandtl_layer
+    WRITE ( 14 )  'prandtl_number                '
+    WRITE ( 14 )  prandtl_number
     WRITE ( 14 )  'precipitation                 '
     WRITE ( 14 )  precipitation
+    WRITE ( 14 )  'psolver                       '
+    WRITE ( 14 )  psolver
     WRITE ( 14 )  'pt_init                       '
     WRITE ( 14 )  pt_init
@@ -371,6 +393,12 @@
     WRITE ( 14 )  'random_heatflux               '
     WRITE ( 14 )  random_heatflux
+    WRITE ( 14 )  'rayleigh_damping_factor       '
+    WRITE ( 14 )  rayleigh_damping_factor
+    WRITE ( 14 )  'rayleigh_damping_height       '
+    WRITE ( 14 )  rayleigh_damping_height
     WRITE ( 14 )  'recycling_width               '
     WRITE ( 14 )  recycling_width
+    WRITE ( 14 )  'residual_limit                '
+    WRITE ( 14 )  residual_limit
     WRITE ( 14 )  'rif_max                       '
     WRITE ( 14 )  rif_max
