Index: palm/trunk/SOURCE/pmc_interface_mod.f90
===================================================================
--- palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 4412)
+++ palm/trunk/SOURCE/pmc_interface_mod.f90	(revision 4413)
@@ -25,4 +25,7 @@
 ! -----------------
 ! $Id$
+! All the USE-statements within subroutines moved up to the module declaration section.
+! 
+! 4385 2020-01-27 08:37:37Z hellstea
 ! Error messages PA0425 and PA0426 made more specific
 ! 
@@ -187,24 +190,26 @@
                pt, pt_2, q, q_2, qc, qc_2, qr, qr_2, s, s_2,                   &
                u, u_p, u_2, v, v_p, v_2, w, w_p, w_2, zu, zw
-
+    
+    USE chem_gasphase_mod,                                                     &
+        ONLY:  nspec
+
+    USE chem_modules,                                                          &
+        ONLY:  chem_species, ibc_cs_b, nesting_chem
+
+    USE chemistry_model_mod,                                                   &
+        ONLY:  spec_conc_2
+    
     USE control_parameters,                                                    &
         ONLY:  air_chemistry, bc_dirichlet_l, bc_dirichlet_n, bc_dirichlet_r,  &
                bc_dirichlet_s, child_domain,                                   &
                constant_diffusion, constant_flux_layer,                        &
-               coupling_char,                                                  &
+               coupling_char, end_time,                                        &
                debug_output_timestep,                                          &
-               dt_3d, dz, humidity, message_string,                            &
-               neutral, passive_scalar, rans_mode, rans_tke_e,                 &
-               roughness_length, salsa, topography, volume_flow
-
-    USE chem_gasphase_mod,                                                     &
-        ONLY:  nspec
-
-    USE chem_modules,                                                          &
-        ONLY:  chem_species, nesting_chem
-
-    USE chemistry_model_mod,                                                   &
-        ONLY:  spec_conc_2
-
+               dt_restart, dt_3d, dz, humidity,                                &
+               ibc_pt_b, ibc_q_b, ibc_s_b, ibc_uv_b,                           &
+               message_string, neutral, passive_scalar, rans_mode, rans_tke_e, &
+               restart_time,                                                   &
+               roughness_length, salsa, topography, volume_flow, time_restart
+    
     USE cpulog,                                                                &
         ONLY:  cpu_log, log_point_s
@@ -241,5 +246,5 @@
 
     USE pmc_general,                                                           &
-        ONLY:  da_namelen
+        ONLY:  da_namelen, pmc_max_array
 
     USE pmc_handle_communicator,                                               &
@@ -258,12 +263,13 @@
 
 #endif
-   
+
     USE salsa_mod,                                                             &
-        ONLY:  aerosol_mass, aerosol_number, gconc_2, mconc_2, nbins_aerosol,  &
+        ONLY:  aerosol_mass, aerosol_number, gconc_2, ibc_salsa_b,             &
+               mconc_2, nbins_aerosol,                                         &
                ncomponents_mass, nconc_2, nesting_salsa, ngases_salsa,         &
                salsa_gas, salsa_gases_from_chem
 
     USE surface_mod,                                                           &
-        ONLY:  surf_def_h, surf_lsm_h, surf_usm_h
+        ONLY:  bc_h, surf_def_h, surf_lsm_h, surf_usm_h
 
     IMPLICIT NONE
@@ -525,7 +531,4 @@
 
  SUBROUTINE pmci_init( world_comm )
-
-    USE control_parameters,                                                                         &
-        ONLY:  message_string
 
     IMPLICIT NONE
@@ -2303,7 +2306,4 @@
                
 #if defined( __parallel ) 
-    USE pmc_general,                                                           &
-        ONLY:  pmc_max_array
-
     IMPLICIT NONE
 !
@@ -3056,8 +3056,4 @@
 
 #if defined( __parallel )
-
-    USE control_parameters,                                                                         &
-        ONLY:  dt_restart, end_time, message_string, restart_time, time_restart
-
     IMPLICIT NONE
 
@@ -4692,16 +4688,4 @@
 
 #if defined( __parallel )
-    USE chem_modules,                                                          &
-        ONLY:  ibc_cs_b
-
-    USE control_parameters,                                                    &
-        ONLY:  ibc_pt_b, ibc_q_b, ibc_s_b, ibc_uv_b
-
-    USE salsa_mod,                                                             &
-        ONLY:  ibc_salsa_b
-
-    USE surface_mod,                                                           &
-        ONLY:  bc_h
-
     IMPLICIT NONE
 
