Index: palm/trunk/SOURCE/CURRENT_MODIFICATIONS
===================================================================
--- palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 254)
+++ palm/trunk/SOURCE/CURRENT_MODIFICATIONS	(revision 256)
@@ -26,5 +26,9 @@
 First constant in array den also defined as type double. (eqn_state_seawater)
 
-advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart, check_open, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_spectra,  eqn_state_seawater, fft_xy, flow_statistics, header, init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid, sort_particles
+topography_grid_convention moved from userpar to inipar (check_parameters,
+header, parin, read_var_list, user_check_parameters, user_header, 
+user_init_grid, user_parin, write_var_list)
+
+advec_particles, advec_s_bc, buoyancy, calc_spectra, check_for_restart, check_open, check_parameters, coriolis, cpu_log, data_output_2d, data_output_3d, data_output_dvrp, data_output_profiles, data_output_spectra,  eqn_state_seawater, fft_xy, flow_statistics, header, init_1d_model, init_3d_model, init_dvrp, init_grid, init_particles, init_pegrid, parin, read_var_list, sort_particles, user_check_parameters, user_header, user_init_grid, user_parin, write_var_list
 
 
Index: palm/trunk/SOURCE/check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/check_parameters.f90	(revision 254)
+++ palm/trunk/SOURCE/check_parameters.f90	(revision 256)
@@ -6,4 +6,6 @@
 ! Bugfix: pressure included for profile output
 ! Check pressure gradient conditions
+! topography_grid_convention moved from user_check_parameters
+! 'single_street_canyon'
 !
 ! Former revisions:
@@ -324,4 +326,40 @@
           CALL message( 'check_parameters', 'PA0014', 1, 2, 0, 6, 0 )
        ENDIF
+!
+!--    In case of non-flat topography, check whether the convention how to 
+!--    define the topography grid has been set correctly, or whether the default
+!--    is applicable. If this is not possible, abort.
+       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
+          IF ( TRIM( topography ) /= 'single_building' .AND.  &
+               TRIM( topography ) /= 'single_street_canyon' .AND.  &
+               TRIM( topography ) /= 'read_from_file' )  THEN
+!--          The default value is not applicable here, because it is only valid
+!--          for the two standard cases 'single_building' and 'read_from_file'
+!--          defined in init_grid.
+             WRITE( message_string, * )  &
+                  'The value for "topography_grid_convention" ',  &
+                  'is not set. Its default value is & only valid for ',  &
+                  '"topography" = ''single_building'', ',  &
+                  '''single_street_canyon'' & or ''read_from_file''.',  &
+                  ' & Choose ''cell_edge'' or ''cell_center''.'
+             CALL message( 'user_check_parameters', 'PA0239', 1, 2, 0, 6, 0 )
+          ELSE
+!--          The default value is applicable here.
+!--          Set convention according to topography.
+             IF ( TRIM( topography ) == 'single_building' .OR.  &
+                  TRIM( topography ) == 'single_street_canyon' )  THEN
+                topography_grid_convention = 'cell_edge'
+             ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
+                topography_grid_convention = 'cell_center'
+             ENDIF
+          ENDIF
+       ELSEIF ( TRIM( topography_grid_convention ) /= 'cell_edge' .AND.  &
+                TRIM( topography_grid_convention ) /= 'cell_center' )  THEN
+          WRITE( message_string, * )  &
+               'The value for "topography_grid_convention" is ', &
+               'not recognized. & Choose ''cell_edge'' or ''cell_center''.'
+          CALL message( 'user_check_parameters', 'PA0240', 1, 2, 0, 6, 0 )
+       ENDIF
+
     ENDIF
 
Index: palm/trunk/SOURCE/header.f90
===================================================================
--- palm/trunk/SOURCE/header.f90	(revision 254)
+++ palm/trunk/SOURCE/header.f90	(revision 256)
@@ -9,4 +9,5 @@
 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b, 
 ! dp_smooth, dpdxy, u_bulk, v_bulk
+! topography_grid_convention moved from user_header
 !
 ! Former revisions:
@@ -425,4 +426,19 @@
 
     END SELECT
+
+    IF ( TRIM( topography ) /= 'flat' )  THEN
+       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
+          IF ( TRIM( topography ) == 'single_building' .OR.  &
+               TRIM( topography ) == 'single_street_canyon' )  THEN
+             WRITE ( io, 278 )
+          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
+             WRITE ( io, 279 )
+          ENDIF
+       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
+          WRITE ( io, 278 )
+       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
+          WRITE ( io, 279 )
+       ENDIF
+    ENDIF
 
     IF ( plant_canopy ) THEN
@@ -1459,4 +1475,9 @@
               ' Canyon height: ', F6.2, 'm, ch = ', I4, '.'      / &
               ' Canyon position (',A,'-walls): cxl = ', I4,', cxr = ', I4, '.')
+278 FORMAT (' Topography grid definition convention:'/ &
+            ' cell edge (staggered grid points'/  &
+            ' (u in x-direction, v in y-direction))' /)
+279 FORMAT (' Topography grid definition convention:'/ &
+            ' cell center (scalar grid points)' /)
 280 FORMAT (//' Vegetation canopy (drag) model:'/ &
               ' ------------------------------'// &
Index: palm/trunk/SOURCE/parin.f90
===================================================================
--- palm/trunk/SOURCE/parin.f90	(revision 254)
+++ palm/trunk/SOURCE/parin.f90	(revision 256)
@@ -7,4 +7,5 @@
 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b, 
 ! dp_smooth, dpdxy, u_bulk, v_bulk in inipar
+! topography_grid_convention moved from userpar
 !
 ! Former revisions:
@@ -117,5 +118,6 @@
              surface_waterflux, s_surface, s_surface_initial_change, &
              s_vertical_gradient, s_vertical_gradient_level, timestep_scheme, &
-             topography, top_heatflux, top_momentumflux_u, top_momentumflux_v, &
+             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, &
Index: palm/trunk/SOURCE/read_var_list.f90
===================================================================
--- palm/trunk/SOURCE/read_var_list.f90	(revision 254)
+++ palm/trunk/SOURCE/read_var_list.f90	(revision 256)
@@ -6,5 +6,5 @@
 ! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left, 
 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b, 
-! dp_smooth, dpdxy, u_bulk, v_bulk
+! dp_smooth, dpdxy, topography_grid_convention, u_bulk, v_bulk
 !
 ! Former revisions:
@@ -499,4 +499,6 @@
           CASE ( 'topography' )
              READ ( 13 )  topography
+          CASE ( 'topography_grid_convention' )
+             READ ( 13 )  topography_grid_convention
           CASE ( 'top_heatflux' )
              READ ( 13 )  top_heatflux
Index: palm/trunk/SOURCE/user_check_parameters.f90
===================================================================
--- palm/trunk/SOURCE/user_check_parameters.f90	(revision 254)
+++ palm/trunk/SOURCE/user_check_parameters.f90	(revision 256)
@@ -4,6 +4,4 @@
 ! Actual revisions:
 ! -----------------
-! add default topography_grid_convention for the new topography case 
-! 'single_street_canyon'
 !
 ! Former revisions:
@@ -25,42 +23,4 @@
 
 !
-!-- In case of non-flat topography, check whether the convention how to 
-!-- define the topography grid has been set correctly, or whether the default
-!-- is applicable. If this is not possible, abort.
-    IF ( TRIM( topography ) /= 'flat' )  THEN
-       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
-          IF ( TRIM( topography ) /= 'single_building' .AND.  &
-               TRIM( topography ) /= 'single_street_canyon' .AND.  &
-               TRIM( topography ) /= 'read_from_file' )  THEN
-!--          The default value is not applicable here, because it is only valid
-!--          for the two standard cases 'single_building' and 'read_from_file'
-!--          defined in init_grid.
-             WRITE( message_string, * )  &
-                  'The value for "topography_grid_convention" ',  &
-                  'is not set. Its default value is & only valid for ',  &
-                  '"topography" = ''single_building'', ',  &
-                  '''single_street_canyon'' & or ''read_from_file''.',  &
-                  ' & Choose ''cell_edge'' or ''cell_center''.'
-             CALL message( 'user_check_parameters', 'UI0001', 1, 2, 0, 6, 0 )
-          ELSE
-!--          The default value is applicable here.
-!--          Set convention according to topography.
-             IF ( TRIM( topography ) == 'single_building' .OR.  &
-                  TRIM( topography ) == 'single_street_canyon' )  THEN
-                topography_grid_convention = 'cell_edge'
-             ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
-                topography_grid_convention = 'cell_center'
-             ENDIF
-          ENDIF
-       ELSEIF ( TRIM( topography_grid_convention ) /= 'cell_edge' .AND.  &
-                TRIM( topography_grid_convention ) /= 'cell_center' )  THEN
-          WRITE( message_string, * )  &
-               'The value for "topography_grid_convention" is ', &
-               'not recognized. & Choose ''cell_edge'' or ''cell_center''.'
-          CALL message( 'user_check_parameters', 'UI0002', 1, 2, 0, 6, 0 )
-       ENDIF
-    ENDIF
-
-!
 !-- Here the user may add code to check the validity of further &userpar 
 !-- control parameters or deduce further quantities.
Index: palm/trunk/SOURCE/user_header.f90
===================================================================
--- palm/trunk/SOURCE/user_header.f90	(revision 254)
+++ palm/trunk/SOURCE/user_header.f90	(revision 256)
@@ -5,4 +5,5 @@
 ! -----------------
 ! new topography case 'single_street_canyon'
+! topography_grid_convention moved to header
 !
 ! Former revisions:
@@ -46,20 +47,4 @@
     ENDIF
 
-    IF ( TRIM( topography ) /= 'flat' )  THEN
-       WRITE ( io, 300 )
-       IF ( TRIM( topography_grid_convention ) == ' ' )  THEN
-          IF ( TRIM( topography ) == 'single_building' .OR.  &
-               TRIM( topography ) == 'single_street_canyon' )  THEN
-             WRITE ( io, 301 )
-          ELSEIF ( TRIM( topography ) == 'read_from_file' )  THEN
-             WRITE ( io, 302 )
-          ENDIF
-       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' )  THEN
-          WRITE ( io, 301 )
-       ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' )  THEN
-          WRITE ( io, 302 )
-       ENDIF
-    ENDIF
-
 !
 !-- Format-descriptors
@@ -70,8 +55,4 @@
 200 FORMAT (' Output of profiles and time series for following regions:' /)
 201 FORMAT (4X,'Region ',I1,':   ',A)
-300 FORMAT (' Topography grid definition convention:'/)
-301 FORMAT (' cell edge (staggered grid points'/  &
-            ' (u in x-direction, v in y-direction))' /)
-302 FORMAT (' cell center (scalar grid points)' /)
 
 
Index: palm/trunk/SOURCE/user_init_grid.f90
===================================================================
--- palm/trunk/SOURCE/user_init_grid.f90	(revision 254)
+++ palm/trunk/SOURCE/user_init_grid.f90	(revision 256)
@@ -5,4 +5,5 @@
 ! -----------------
 ! add 'single_street_canyon' as standard topography case
+! -topography_grid_convention
 !
 ! Former revisions:
@@ -45,13 +46,5 @@
        CASE ( 'user_defined_topography_1' )
 !
-!--       Here the user can define his own topography. 
-
-!
-!--       For each user-defined topography, the topography grid convention has 
-!--       to be explicitly set to either 'cell_edge' or 'cell_center'.
-!--       topography_grid_convention = 'cell_edge'     ! OR:
-!--       topography_grid_convention = 'cell_center'
-
-!
+!--       Here the user can define his own topography.
 !--       After definition, please remove the following three lines!
           PRINT*, '+++ user_init_grid: topography "', &
Index: palm/trunk/SOURCE/user_parin.f90
===================================================================
--- palm/trunk/SOURCE/user_parin.f90	(revision 254)
+++ palm/trunk/SOURCE/user_parin.f90	(revision 256)
@@ -4,5 +4,5 @@
 ! Actual revisions:
 ! -----------------
-! 
+! topography_grid_convention moved to inipar
 !
 ! Former revisions:
@@ -31,6 +31,5 @@
 
 
-    NAMELIST /userpar/  data_output_pr_user, data_output_user, region,  &
-                        topography_grid_convention
+    NAMELIST /userpar/  data_output_pr_user, data_output_user, region
 
 !
Index: palm/trunk/SOURCE/write_var_list.f90
===================================================================
--- palm/trunk/SOURCE/write_var_list.f90	(revision 254)
+++ palm/trunk/SOURCE/write_var_list.f90	(revision 256)
@@ -6,5 +6,5 @@
 ! +canyon_height, canyon_width_x, canyon_width_y, canyon_wall_left, 
 ! canyon_wall_south, conserve_volume_flow_mode, dp_external, dp_level_b, 
-! dp_smooth, dpdxy, u_bulk, v_bulk
+! dp_smooth, dpdxy, topography_grid_convention, u_bulk, v_bulk
 !
 ! Former revisions:
@@ -423,4 +423,6 @@
     WRITE ( 14 )  'topography                    '
     WRITE ( 14 )  topography
+    WRITE ( 14 )  'topography_grid_convention    '
+    WRITE ( 14 )  topography_grid_convention
     WRITE ( 14 )  'top_heatflux                  '
     WRITE ( 14 )  top_heatflux
