Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 840)
+++ palm/trunk/SCRIPTS/mrun	(revision 841)
@@ -250,4 +250,5 @@
      # 22/02/12 - Siggi  - -s info updated
      # 22/02/12 - Siggi  - case "-s WP" removed
+     # 28/02/12 - BjornM - further adjustments for namelist file check
 
 
@@ -2362,5 +2363,18 @@
 
 #### PERFORM PARAMETER FILE CHECK (COUPLED RUNS ARE NOT SUPPORTED YET)
+
+#DEFINE VARIABLES FOR FREQUENTLY USED DIRECTORIES
+ check_depository="${working_directory}/trunk/UTIL"
+ check_sources="${working_directory}/tmp_check_namelist_files"
  skip_check=false
+
+#CHECK IF NAMELIST_FILE_CHECK HAS BEEN COMPILED SUCCESSFULLY
+ if [[ ! -f $check_depository/check_namelist_files.tar || ! -f $PALM_BIN/check_namelist_files.x ]]
+ then
+    skip_check=true 
+
+ fi
+
+#ONLY PERFORM CHECK IF -z OPTION IS NOT SET, NO RESTART RUN IS CARRIED OUT AND IF THE EXECUTION HOST IS THE LOCAL HOST
  if [[ $check_namelist_files == false || $fromhost != $localhost || $run_coupled_model == true || $restart_run == true ]]
  then
@@ -2421,4 +2435,5 @@
        printf "\n  +++ no PARIN list entry found for d3f in the configuration file."
     fi
+
 #   GET TOPOGRAPHY PARAMETER FILE SUFFIX (USUALLY "_P3DF"). THIS FILE MIGHT IS
 #   NOT NECESSARILY REQUIRED
@@ -2442,8 +2457,4 @@
 
     rm -rf ${working_directory}/tmp_check
-
-#   DEFINE VARIABLES FOR FREQUENTLY USED DIRECTORIES
-    check_depository="${working_directory}/trunk/UTIL"
-    check_sources="${working_directory}/tmp_check_namelist_files"
 
 #   CHECK IF THE A P3DF FILE MUST BE CHECKED
Index: palm/trunk/SOURCE/Makefile_check
===================================================================
--- palm/trunk/SOURCE/Makefile_check	(revision 840)
+++ palm/trunk/SOURCE/Makefile_check	(revision 841)
@@ -4,4 +4,5 @@
 # Current revisions:
 # ------------------
+# Added: exchange_horiz, exchange_horiz_2d, random_function
 #
 # Former revisions:
@@ -25,8 +26,10 @@
 
 RCS = check_open.f90 check_namelist_files.f90 check_parameters.f90 \
-      close_file.f90 cpu_log.f90 fft_xy.f90 init_grid.f90 init_masks.f90 \
+      close_file.f90 cpu_log.f90 exchange_horiz.f90 exchange_horiz_2d.f90 \
+      fft_xy.f90 init_grid.f90 init_masks.f90 \
       init_pegrid.f90 local_flush.f90 local_stop.f90 local_system.f90 \
       message.f90 modules.f90 package_parin.f90 parin.f90 poisfft.f90 \
-      poisfft_hybrid.f90 singleton.f90 subsidence.f90 temperton_fft.f90 \
+      poisfft_hybrid.f90 random_function.f90 singleton.f90 subsidence.f90 \
+      temperton_fft.f90 \
       user_3d_data_averaging.f90 user_actions.f90 \
       user_additional_routines.f90 user_advec_particles.f90 \
@@ -45,8 +48,9 @@
 
 OBJS = check_open.o check_namelist_files.o check_parameters.o close_file.o \
-      cpu_log.o fft_xy.o init_grid.o init_masks.o init_pegrid.o \
+      cpu_log.o exchange_horiz.o exchange_horiz_2d.o fft_xy.o init_grid.o \
+      init_masks.o init_pegrid.o \
       local_flush.o local_stop.o local_system.o message.o \
       modules.o package_parin.o parin.o poisfft.o \
-      poisfft_hybrid.o singleton.o subsidence.o temperton_fft.o \
+      poisfft_hybrid.o random_function.o singleton.o subsidence.o temperton_fft.o \
       user_3d_data_averaging.o user_actions.o user_additional_routines.o \
       user_advec_particles.o user_check_data_output.o \
@@ -90,4 +94,6 @@
 close_file.o: modules.o
 cpu_log.o: modules.o
+exchange_horiz.o: modules.o
+exchange_horiz_2d.o: modules.o
 fft_xy.o: modules.o singleton.o temperton_fft.o
 init_grid.o: modules.o
@@ -101,4 +107,5 @@
 poisfft.o: modules.o fft_xy.o
 poisfft_hybrid.o: modules.o fft_xy.o
+random_function.o: modules.o
 singleton.o: singleton.f90
 subsidence.o: modules.o
Index: palm/trunk/SOURCE/exchange_horiz.f90
===================================================================
--- palm/trunk/SOURCE/exchange_horiz.f90	(revision 840)
+++ palm/trunk/SOURCE/exchange_horiz.f90	(revision 841)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Excluded routine from compilation of namelist_file_check
 !
 ! Former revisions:
@@ -59,11 +59,15 @@
     IMPLICIT NONE
 
+
+    INTEGER ::  nbgp_local
+    REAL, DIMENSION(nzb:nzt+1,nys-nbgp_local:nyn+nbgp_local, &
+                    nxl-nbgp_local:nxr+nbgp_local) ::  ar
+
+#if ! defined( __check )
 #if defined( __parallel )
     INTEGER, DIMENSION(4)                 ::  req
     INTEGER, DIMENSION(MPI_STATUS_SIZE,4) ::  wait_stat
 #endif
-    INTEGER ::  nbgp_local
-    REAL, DIMENSION(nzb:nzt+1,nys-nbgp_local:nyn+nbgp_local, &
-                    nxl-nbgp_local:nxr+nbgp_local) ::  ar
+
 
     CALL cpu_log( log_point_s(2), 'exchange_horiz', 'start' )
@@ -187,4 +191,4 @@
     CALL cpu_log( log_point_s(2), 'exchange_horiz', 'stop' )
 
-
+#endif
  END SUBROUTINE exchange_horiz
Index: palm/trunk/SOURCE/exchange_horiz_2d.f90
===================================================================
--- palm/trunk/SOURCE/exchange_horiz_2d.f90	(revision 840)
+++ palm/trunk/SOURCE/exchange_horiz_2d.f90	(revision 841)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Excluded routine from compilation of namelist_file_check
 !
 ! Former revisions:
@@ -48,8 +48,9 @@
     IMPLICIT NONE
 
+
     REAL ::  ar(nysg:nyng,nxlg:nxrg)
     INTEGER :: i
 
-
+#if ! defined( __check )
     CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'start' )
 
@@ -146,4 +147,5 @@
     CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'stop' )
 
+#endif
  END SUBROUTINE exchange_horiz_2d
 
@@ -170,4 +172,5 @@
     INTEGER :: i
 
+#if ! defined( __check )
     CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'start' )
 
@@ -239,3 +242,4 @@
     CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'stop' )
 
+#endif
  END SUBROUTINE exchange_horiz_2d_int
Index: palm/trunk/SOURCE/user_parin.f90
===================================================================
--- palm/trunk/SOURCE/user_parin.f90	(revision 840)
+++ palm/trunk/SOURCE/user_parin.f90	(revision 841)
@@ -4,5 +4,5 @@
 ! Current revisions:
 ! -----------------
-! 
+! Bugfix: disable max_pr_user check during prior namelist file check
 !
 ! Former revisions:
@@ -83,4 +83,5 @@
 !-- restart file (already stored in max_pr_user) has to match the one given
 !-- for the current run
+#if ! defined ( __check )
     IF ( TRIM( initializing_actions ) == 'read_restart_data' )  THEN
        IF ( max_pr_user /= max_pr_user_tmp )  THEN
@@ -95,4 +96,5 @@
        max_pr_user = max_pr_user_tmp
     ENDIF
+#endif
 
 100 RETURN
