Index: palm/trunk/SOURCE/read_3d_binary.f90
===================================================================
--- palm/trunk/SOURCE/read_3d_binary.f90	(revision 110)
+++ palm/trunk/SOURCE/read_3d_binary.f90	(revision 143)
@@ -4,5 +4,9 @@
 ! Actual revisions:
 ! -----------------
-! 
+! Restart file has to be re-opened on all PEs except PE0
+! -dopr_time_count,
+! hom_sum moved, volume_flow_area, volume_flow_initial moved to read_var_list,
+! reading of old profil parameters (cross_..., dopr_crossindex, profile_***)
+! removed
 !
 ! Former revisions:
@@ -54,18 +58,15 @@
     CHARACTER (LEN=10) ::  binary_version, version_on_file
     CHARACTER (LEN=20) ::  field_chr
-    CHARACTER (LEN=10),  DIMENSION(:), ALLOCATABLE ::  chdum10
-    CHARACTER (LEN=40),  DIMENSION(:), ALLOCATABLE ::  chdum40
-    CHARACTER (LEN=100), DIMENSION(:), ALLOCATABLE ::  chdum100
 
     INTEGER ::  idum1, myid_on_file, numprocs_on_file, nxl_on_file, &
                 nxr_on_file, nyn_on_file, nys_on_file, nzb_on_file, nzt_on_file
 
-    INTEGER, DIMENSION(:), ALLOCATABLE ::  idum
-
-    REAL, DIMENSION(:), ALLOCATABLE ::  rdum
-
 !
 !-- Read data from previous model run. unit 13 already opened in parin
     CALL cpu_log( log_point_s(14), 'read_3d_binary', 'start' )
+
+!
+!-- Restart file has to be re-opened on all PEs except PE0
+    CALL check_open( 13 )
 
 !
@@ -173,10 +174,4 @@
        CALL local_stop
     ENDIF
-
-!
-!-- Local arrays that may be required for possible temporary information 
-!-- storage in the following
-    ALLOCATE( chdum10(crmax), chdum40(crmax), chdum100(crmax), &
-              idum(100*crmax), rdum(100*crmax) )
 
 !
@@ -304,8 +299,4 @@
           CASE ( 'shf_m' )
              READ ( 13 )  shf_m
-          CASE ( 'tswst' )
-             READ ( 13 )  tswst
-          CASE ( 'tswst_m' )
-             READ ( 13 )  tswst_m
           CASE ( 'spectrum_x' )
              READ ( 13 )  spectrum_x
@@ -317,4 +308,8 @@
              ALLOCATE( ts_av(nys-1:nyn+1,nxl-1:nxr+1) )
              READ ( 13 )  ts_av
+          CASE ( 'tswst' )
+             READ ( 13 )  tswst
+          CASE ( 'tswst_m' )
+             READ ( 13 )  tswst_m
           CASE ( 'u' )
              READ ( 13 )  u
@@ -347,8 +342,4 @@
           CASE ( 'v' )
              READ ( 13 )  v
-          CASE ( 'volume_flow_area' )
-             READ ( 13 )  volume_flow_area
-          CASE ( 'volume_flow_initial' )
-             READ ( 13 )  volume_flow_initial
           CASE ( 'v_av' )
              ALLOCATE( v_av(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
@@ -400,157 +391,4 @@
              READ ( 13 )  z0_av
 
-          CASE ( 'cross_linecolors' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_linecolors
-             ELSE
-                READ ( 13 )  idum
-             ENDIF
-          CASE ( 'cross_linestyles' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_linestyles
-             ELSE
-                READ ( 13 )  idum
-             ENDIF
-          CASE ( 'cross_normalized_x' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_normalized_x
-             ELSE
-                READ ( 13 )  chdum10
-             ENDIF
-          CASE ( 'cross_normalized_y' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_normalized_y
-             ELSE
-                READ ( 13 )  chdum10
-             ENDIF
-          CASE ( 'cross_normx_factor' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_normx_factor
-             ELSE
-                READ ( 13 )  rdum
-             ENDIF
-          CASE ( 'cross_normy_factor' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_normy_factor
-             ELSE
-                READ ( 13 )  rdum
-             ENDIF
-          CASE ( 'cross_profiles' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_profiles
-             ELSE
-                READ ( 13 )  chdum100
-             ENDIF
-          CASE ( 'cross_profile_n_coun' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_profile_number_count
-             ELSE
-                READ ( 13 )  idum(1:crmax)
-             ENDIF
-          CASE ( 'cross_profile_number' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_profile_numbers
-             ELSE
-                READ ( 13 )  idum
-             ENDIF
-          CASE ( 'cross_uxmax' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_uxmax
-             ELSE
-                READ ( 13 )  rdum(1:crmax)
-             ENDIF
-          CASE ( 'cross_uxmax_computed' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_uxmax_computed
-             ELSE
-                READ ( 13 )  rdum(1:crmax)
-             ENDIF
-          CASE ( 'cross_uxmax_normaliz' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_uxmax_normalized
-             ELSE
-                READ ( 13 )  rdum(1:crmax)
-             ENDIF
-          CASE ( 'cross_uxmax_norm_com' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_uxmax_normalized_computed
-             ELSE
-                READ ( 13 )  rdum(1:crmax)
-             ENDIF
-          CASE ( 'cross_uxmin' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_uxmin
-             ELSE
-                READ ( 13 )  rdum(1:crmax)
-             ENDIF
-          CASE ( 'cross_uxmin_computed' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_uxmin_computed
-             ELSE
-                READ ( 13 )  rdum(1:crmax)
-             ENDIF
-          CASE ( 'cross_uxmin_normaliz' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_uxmin_normalized
-             ELSE
-                READ ( 13 )  rdum(1:crmax)
-             ENDIF
-          CASE ( 'cross_uxmin_norm_com' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_uxmin_normalized_computed
-             ELSE
-                READ ( 13 )  rdum(1:crmax)
-             ENDIF
-          CASE ( 'cross_uymax' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_uymax
-             ELSE
-                READ ( 13 )  rdum(1:crmax)
-             ENDIF
-          CASE ( 'cross_uymin' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_uymin
-             ELSE
-                READ ( 13 )  rdum(1:crmax)
-             ENDIF
-          CASE ( 'cross_xtext' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  cross_xtext
-             ELSE
-                READ ( 13 )  chdum40
-             ENDIF
-          CASE ( 'dopr_crossindex' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  dopr_crossindex
-             ELSE
-                READ ( 13 )  idum(1:100)
-             ENDIF
-          CASE ( 'dopr_time_count' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  dopr_time_count
-             ELSE
-                READ ( 13 )  idum1
-             ENDIF
-          CASE ( 'hom_sum' )
-             READ ( 13 )  hom_sum
-          CASE ( 'profile_columns' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  profile_columns
-             ELSE
-                READ ( 13 )  idum1
-             ENDIF
-          CASE ( 'profile_number' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  profile_number
-             ELSE
-                READ ( 13 )  idum1
-             ENDIF
-          CASE ( 'profile_rows' )
-             IF ( use_prior_plot1d_parameters )  THEN
-                READ ( 13 )  profile_rows
-             ELSE
-                READ ( 13 )  idum1
-             ENDIF
-
           CASE DEFAULT
              PRINT*, '+++ init_3d_model: unknown field named "', &
@@ -566,6 +404,4 @@
     ENDDO
 
-    DEALLOCATE( chdum10, chdum40, chdum100, idum, rdum )
-
 !
 !-- End of time measuring for reading binary data
