Index: palm/trunk/SOURCE/read_3d_binary.f90
===================================================================
--- palm/trunk/SOURCE/read_3d_binary.f90	(revision 1319)
+++ palm/trunk/SOURCE/read_3d_binary.f90	(revision 1320)
@@ -20,5 +20,11 @@
 ! Current revisions:
 ! -----------------
-!
+! ONLY-attribute added to USE-statements,
+! kind-parameters added to all INTEGER and REAL declaration statements,
+! kinds are defined in new module kinds,
+! old module precision_kind is removed,
+! revision history before 2012 removed,
+! comment fields (!:) to be used for variable explanations added to
+! all variable declaration statements
 !
 ! Former revisions:
@@ -46,56 +52,4 @@
 ! +z0h, z0h_av
 !
-! 776 2011-10-31 08:02:51Z heinze
-! bugfix: increase binary_version due to last commit
-!
-! 771 2011-10-27 10:56:21Z heinze
-! +lpt_av
-!
-! 667 2010-12-23 12:06:00Z suehring/gryschka
-! +/- 1 replaced with +/- nbgp when swapping and allocating variables.
-! Bugfix: When using initializing_actions = 'cyclic_fill' in some cases
-! not the whole model domain was filled with data of the prerun.
-!
-! 410 2009-12-04 17:05:40Z letzel
-! format changed in test output from I2 to I4
-!
-! 367 2009-08-25 08:35:52Z maronga
-! Output of messages replaced by message handling routine.
-! +shf_av, qsws_av
-!
-! 220 2008-12-18 07:00:36Z raasch
-! reading mechanism completely revised (subdomain/total domain size can vary
-! arbitrarily between current and previous run)
-! Bugfix: reading of spectrum_x|y from restart files ignored if total numbers
-! of grid points do not match
-!
-! 150 2008-02-29 08:19:58Z raasch
-! Files from which restart data are to be read are determined and subsequently
-! opened. The total domain on the restart file is allowed to be smaller than
-! the current total domain. In this case it will be periodically mapped on the
-! current domain (needed for recycling method).
-! +call of user_read_restart_data, -dopr_time_count,
-! hom_sum, volume_flow_area, volume_flow_initial moved to read_var_list,
-! reading of old profil parameters (cross_..., dopr_crossindex, profile_***)
-! removed, initialization of spectrum_x|y removed
-!
-! 102 2007-07-27 09:09:17Z raasch
-! +uswst, uswst_m, vswst, vswst_m
-!
-! 96 2007-06-04 08:07:41Z raasch
-! +rho_av, sa, sa_av, saswsb, saswst
-!
-! 73 2007-03-20 08:33:14Z raasch
-! +precipitation_amount, precipitation_rate_av, rif_wall, u_m_l, u_m_r, etc.,
-! z0_av
-!
-! 19 2007-02-23 04:53:48Z raasch
-! +qswst, qswst_m, tswst, tswst_m
-! 
-! RCS Log replace by Id keyword, revision history cleaned up
-!
-! Revision 1.4  2006/08/04 15:02:32  raasch
-! +iran, iran_part
-!
 ! Revision 1.1  2004/04/30 12:47:27  raasch
 ! Initial revision
@@ -107,42 +61,106 @@
 !------------------------------------------------------------------------------!
 
-    USE arrays_3d
+    USE arrays_3d,                                                             &
+        ONLY:  e, kh, km, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, qr, qrs,   &
+               qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst, rif,        &
+               rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us,    &
+               usws, uswst, v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, vsws, vswst,   &
+               w, w_m_l, w_m_n, w_m_r, w_m_s, z0, z0h
+
     USE averaging
-    USE cloud_parameters
-    USE control_parameters
-    USE cpulog
-    USE indices
-    USE particle_attributes
+
+    USE cloud_parameters,                                                      &
+        ONLY:  prr, precipitation_amount
+
+    USE control_parameters,                                                    &
+        ONLY:  iran, humidity, passive_scalar, cloud_physics, cloud_droplets,  &
+               icloud_scheme, message_string, outflow_l, outflow_n, outflow_r, &
+               outflow_s, precipitation, ocean, topography
+
+    USE cpulog,                                                                &
+        ONLY:  cpu_log, log_point_s
+
+    USE indices,                                                               &
+        ONLY:  nbgp, nx, nxl, nxlg, nxr, nxrg, nx_on_file, ny, nys, nysg, nyn, &
+               nyng, ny_on_file, nzb, nzt
+
+    USE kinds
+
+    USE particle_attributes,                                                   &
+        ONLY:  iran_part
+
     USE pegrid
-    USE profil_parameter
-    USE random_function_mod
-    USE statistics
+
+    USE random_function_mod,                                                   &
+        ONLY:  random_iv, random_iy
+
+    USE statistics,                                                            &
+        ONLY:  spectrum_x, spectrum_y
+
 
     IMPLICIT NONE
 
     CHARACTER (LEN=5)  ::  myid_char_save
-    CHARACTER (LEN=10) ::  binary_version, version_on_file
+    CHARACTER (LEN=10) ::  binary_version
+    CHARACTER (LEN=10) ::  version_on_file
     CHARACTER (LEN=20) ::  field_chr
 
-    INTEGER ::  files_to_be_opened, i, j, k, myid_on_file,                    &
-                numprocs_on_file, nxlc, nxlf, nxlpr, nxl_on_file, nxrc, nxrf, &
-                nxrpr, nxr_on_file, nync, nynf, nynpr, nyn_on_file, nysc,     &
-                nysf, nyspr, nys_on_file, nzb_on_file, nzt_on_file, offset_x, &
-                offset_y, shift_x, shift_y
-
-    INTEGER, DIMENSION(numprocs_previous_run) ::  file_list, overlap_count
-
-    INTEGER, DIMENSION(numprocs_previous_run,1000) ::  nxlfa, nxrfa, nynfa, &
-                                                       nysfa, offset_xa, &
-                                                       offset_ya
-    REAL ::  rdummy
-
-    REAL, DIMENSION(:,:), ALLOCATABLE     ::  tmp_2d
-    REAL, DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3d, tmp_3dwul, tmp_3dwun,    &
-                                              tmp_3dwur, tmp_3dwus, tmp_3dwvl, &
-                                              tmp_3dwvn, tmp_3dwvr, tmp_3dwvs, &
-                                              tmp_3dwwl, tmp_3dwwn, tmp_3dwwr, &
-                                              tmp_3dwws
-    REAL, DIMENSION(:,:,:,:), ALLOCATABLE ::  tmp_4d
+    INTEGER(iwp) ::  files_to_be_opened  !:
+    INTEGER(iwp) ::  i                   !:
+    INTEGER(iwp) ::  j                   !:
+    INTEGER(iwp) ::  k                   !:
+    INTEGER(iwp) ::  myid_on_file        !:
+    INTEGER(iwp) ::  numprocs_on_file    !:
+    INTEGER(iwp) ::  nxlc                !:
+    INTEGER(iwp) ::  nxlf                !:
+    INTEGER(iwp) ::  nxlpr               !:
+    INTEGER(iwp) ::  nxl_on_file         !:
+    INTEGER(iwp) ::  nxrc                !:
+    INTEGER(iwp) ::  nxrf                !:
+    INTEGER(iwp) ::  nxrpr               !:
+    INTEGER(iwp) ::  nxr_on_file         !:
+    INTEGER(iwp) ::  nync                !:
+    INTEGER(iwp) ::  nynf                !:
+    INTEGER(iwp) ::  nynpr               !:
+    INTEGER(iwp) ::  nyn_on_file         !:
+    INTEGER(iwp) ::  nysc                !:
+    INTEGER(iwp) ::  nysf                !:
+    INTEGER(iwp) ::  nyspr               !:
+    INTEGER(iwp) ::  nys_on_file         !:
+    INTEGER(iwp) ::  nzb_on_file         !:
+    INTEGER(iwp) ::  nzt_on_file         !:
+    INTEGER(iwp) ::  offset_x            !:
+    INTEGER(iwp) ::  offset_y            !:
+    INTEGER(iwp) ::  shift_x             !:
+    INTEGER(iwp) ::  shift_y             !:
+
+    INTEGER(iwp), DIMENSION(numprocs_previous_run) ::  file_list       !:
+    INTEGER(iwp), DIMENSION(numprocs_previous_run) ::  overlap_count   !:
+
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  nxlfa      !:
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  nxrfa      !:
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  nynfa      !:
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  nysfa      !:
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  offset_xa  !:
+    INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) ::  offset_ya  !:
+
+    REAL(wp) ::  rdummy
+
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE     ::  tmp_2d     !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3d     !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwul  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwun  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwur  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwus  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwvl  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwvn  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwvr  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwvs  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwwl  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwwn  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwwr  !:
+    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE   ::  tmp_3dwws  !:
+
+    REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE ::  tmp_4d     !:
 
 
