Index: palm/trunk/UTIL/inifor/src/inifor.f90
===================================================================
--- palm/trunk/UTIL/inifor/src/inifor.f90	(revision 3615)
+++ palm/trunk/UTIL/inifor/src/inifor.f90	(revision 3618)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! Prefixed all INIFOR modules with inifor_
+! 
+! 
+! 3615 2018-12-10 07:21:03Z raasch
 ! bugfix: abort replaced by inifor_abort
 ! 
@@ -74,7 +78,7 @@
  PROGRAM inifor
 
-    USE control
-    USE defs
-    USE grid,                                                                  &
+    USE inifor_control
+    USE inifor_defs
+    USE inifor_grid,                                                           &
         ONLY:  setup_parameters, setup_grids, setup_variable_tables,           &
                setup_io_groups, fini_grids, fini_variables, fini_io_groups,    &
@@ -84,10 +88,10 @@
                averaging_width_ns, averaging_width_ew, phi_n, lambda_n,        &
                lam_centre, phi_centre
-    USE io
-    USE transform,                                                             &
+    USE inifor_io
+    USE inifor_transform,                                                      &
         ONLY:  average_profile, interpolate_2d, interpolate_3d,                &
                geostrophic_winds, extrapolate_density, extrapolate_pressure,   &
                get_surface_pressure
-    USE types
+    USE inifor_types
     
     IMPLICIT NONE
Index: palm/trunk/UTIL/inifor/src/inifor_control.f90
===================================================================
--- palm/trunk/UTIL/inifor/src/inifor_control.f90	(revision 3615)
+++ palm/trunk/UTIL/inifor/src/inifor_control.f90	(revision 3618)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! Prefixed all INIFOR modules with inifor_
+! 
+! 
+! 3614 2018-12-10 07:05:46Z raasch
 ! abort renamed inifor_abort to avoid intrinsic problem in Fortran
 ! 
@@ -58,10 +62,10 @@
 !> feedback to the terminal and a log file.
 !------------------------------------------------------------------------------!
- MODULE control
-
-    USE defs,                                                                  &
+ MODULE inifor_control
+
+    USE inifor_defs,                                                           &
         ONLY:  LNAME, dp, VERSION, COPYRIGHT
 
-    USE util,                                                                  &
+    USE inifor_util,                                                           &
         ONLY:  real_to_str, real_to_str_f
 
@@ -258,4 +262,4 @@
     END SUBROUTINE run_control
 
- END MODULE
-
+ END MODULE inifor_control
+
Index: palm/trunk/UTIL/inifor/src/inifor_defs.f90
===================================================================
--- palm/trunk/UTIL/inifor/src/inifor_defs.f90	(revision 3615)
+++ palm/trunk/UTIL/inifor/src/inifor_defs.f90	(revision 3618)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! Prefixed module with inifor_
+! 
+! 
+! 3613 2018-12-07 18:20:37Z eckhard
 ! Bumped version number
 ! 
@@ -73,5 +77,5 @@
 !> The defs module provides global constants used in INIFOR.
 !------------------------------------------------------------------------------!
- MODULE defs
+ MODULE inifor_defs
  
  IMPLICIT NONE
@@ -127,3 +131,3 @@
      ACHAR( 10 ) // ' Copyright 2017-2018 Deutscher Wetterdienst Offenbach' !< Copyright notice
 
- END MODULE defs
+ END MODULE inifor_defs
Index: palm/trunk/UTIL/inifor/src/inifor_grid.f90
===================================================================
--- palm/trunk/UTIL/inifor/src/inifor_grid.f90	(revision 3615)
+++ palm/trunk/UTIL/inifor/src/inifor_grid.f90	(revision 3618)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! Prefixed all INIFOR modules with inifor_, removed unused variables
+! 
+! 
+! 3615 2018-12-10 07:21:03Z raasch
 ! bugfix: abort replaced by inifor_abort
 ! 
@@ -97,19 +101,17 @@
 !------------------------------------------------------------------------------!
 
- MODULE grid
-
-    USE control
-    USE defs,                                                                  &
+ MODULE inifor_grid
+
+    USE inifor_control
+    USE inifor_defs,                                                           &
         ONLY:  DATE, EARTH_RADIUS, TO_RADIANS, TO_DEGREES, PI, dp, hp, sp,     &
                SNAME, LNAME, PATH, FORCING_STEP, WATER_ID, FILL_ITERATIONS,    &
                BETA, P_SL, T_SL, BETA, RD, RV, G, P_REF, RD_PALM, CP_PALM,     &
                RHO_L, OMEGA, HECTO
-    USE io,                                                                    &
+    USE inifor_io,                                                             &
         ONLY:  get_netcdf_attribute, get_netcdf_dim_vector,                    &
                get_netcdf_variable, parse_command_line_arguments,              &
                validate_config
-    USE netcdf,                                                                &
-        ONLY:  NF90_MAX_NAME, NF90_MAX_VAR_DIMS
-    USE transform,                                                             &
+    USE inifor_transform,                                                      &
         ONLY:  average_2d, rotate_to_cosmo, find_horizontal_neighbours,&
                compute_horizontal_interp_weights,                              &
@@ -119,6 +121,8 @@
                project, centre_velocities, phi2phirot, rla2rlarot, uv2uvrot,   &
                phirot2phi, rlarot2rla
-    USE types
-    USE util
+    USE inifor_types
+    USE inifor_util
+    USE netcdf,                                                                &
+        ONLY:  NF90_MAX_NAME, NF90_MAX_VAR_DIMS
     
     IMPLICIT NONE
@@ -628,5 +632,5 @@
        phirot = project(0.5_dp*ly, y0, EARTH_RADIUS) * TO_DEGREES,             &
        rlarot = project(0.5_dp*lx, x0, EARTH_RADIUS) * TO_DEGREES,             &
-       polphi = phi_cn * TO_DEGREES, pollam = lambda_cn * TO_DEGREES,          &
+       polphi = phi_cn * TO_DEGREES,                                           &
        polgam = gam * TO_DEGREES                                               &
     ) * TO_RADIANS
@@ -660,5 +664,5 @@
     f3 = 2.0_dp * OMEGA * SIN(                                                 &
        TO_RADIANS*phirot2phi( phi_centre * TO_DEGREES, lam_centre * TO_DEGREES,&
-                              phi_n * TO_DEGREES, lambda_n * TO_DEGREES,       &
+                              phi_n * TO_DEGREES,                              &
                               gam * TO_DEGREES )                               &
        )
@@ -1825,5 +1829,4 @@
        IF ( number_stretch_level_end >= 1 ) THEN 
           CALL calculate_stretching_factor( number_stretch_level_end, dz,      & 
-                                            dz_stretch_factor,                 &
                                             dz_stretch_factor_array,           &   
                                             dz_stretch_level_end,              &
@@ -1903,5 +1906,5 @@
 !> results into an overdetermined system. 
 !------------------------------------------------------------------------------!
- SUBROUTINE calculate_stretching_factor( number_end, dz, dz_stretch_factor,    &
+ SUBROUTINE calculate_stretching_factor( number_end, dz,                       &
                                          dz_stretch_factor_array,              &   
                                          dz_stretch_level_end,                 &
@@ -1911,5 +1914,4 @@
     REAL(dp), DIMENSION(:), INTENT(INOUT) ::  dz_stretch_factor_array
     REAL(dp), DIMENSION(:), INTENT(IN)    ::  dz_stretch_level_end, dz_stretch_level_start
-    REAL(dp)                              ::  dz_stretch_factor
   
     INTEGER ::  iterations  !< number of iterations until stretch_factor_lower/upper_limit is reached  
@@ -4117,3 +4119,3 @@
     END SUBROUTINE get_soil_layer_thickness
 
- END MODULE grid
+ END MODULE inifor_grid
Index: palm/trunk/UTIL/inifor/src/inifor_io.f90
===================================================================
--- palm/trunk/UTIL/inifor/src/inifor_io.f90	(revision 3615)
+++ palm/trunk/UTIL/inifor/src/inifor_io.f90	(revision 3618)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! Prefixed all INIFOR modules with inifor_
+! 
+! 
+! 3615 2018-12-10 07:21:03Z raasch
 ! bugfix: abort replaced by inifor_abort
 ! 
@@ -87,13 +91,13 @@
 !> INIFOR.
 !------------------------------------------------------------------------------!
- MODULE io
-
-    USE control
-    USE defs,                                                                  &
+ MODULE inifor_io
+
+    USE inifor_control
+    USE inifor_defs,                                                           &
         ONLY:  DATE, SNAME, PATH, PI, dp, hp, TO_RADIANS, TO_DEGREES, VERSION
+    USE inifor_types
+    USE inifor_util,                                                           &
+        ONLY:  reverse, str, real_to_str
     USE netcdf
-    USE types
-    USE util,                                                                  &
-        ONLY:  reverse, str, real_to_str
 
     IMPLICIT NONE
@@ -1222,3 +1226,3 @@
     END SUBROUTINE check
 
- END MODULE io
+ END MODULE inifor_io
Index: palm/trunk/UTIL/inifor/src/inifor_transform.f90
===================================================================
--- palm/trunk/UTIL/inifor/src/inifor_transform.f90	(revision 3615)
+++ palm/trunk/UTIL/inifor/src/inifor_transform.f90	(revision 3618)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! Prefixed all INIFOR modules with inifor_, removed unused variables
+! 
+! 
+! 3615 2018-12-10 07:21:03Z raasch
 ! bugfix: abort replaced by inifor_abort
 ! 
@@ -76,11 +80,11 @@
 !> int2lm's utility routines.
 !------------------------------------------------------------------------------!
- MODULE transform
-
-    USE control
-    USE defs,                                                                  &
+ MODULE inifor_transform
+
+    USE inifor_control
+    USE inifor_defs,                                                           &
         ONLY: G, TO_DEGREES, TO_RADIANS, PI, dp
-    USE types
-    USE util,                                                                  &       
+    USE inifor_types
+    USE inifor_util,                                                           &
         ONLY: real_to_str, str
 
@@ -622,5 +626,4 @@
                                    lamr(i) * TO_DEGREES,                       &
                                    phip * TO_DEGREES,                          &
-                                   lamp * TO_DEGREES,                          &
                                    gam  * TO_DEGREES) * TO_RADIANS
 
@@ -1162,8 +1165,7 @@
 !> Compute the geographical latitude of a point given in rotated-pole cordinates
 !------------------------------------------------------------------------------!
-    FUNCTION phirot2phi (phirot, rlarot, polphi, pollam, polgam)
+    FUNCTION phirot2phi (phirot, rlarot, polphi, polgam)
     
        REAL(dp), INTENT (IN) ::  polphi      !< latitude of the rotated north pole
-       REAL(dp), INTENT (IN) ::  pollam      !< longitude of the rotated north pole
        REAL(dp), INTENT (IN) ::  phirot      !< latitude in the rotated system
        REAL(dp), INTENT (IN) ::  rlarot      !< longitude in the rotated system
@@ -1396,4 +1398,4 @@
     END SUBROUTINE uvrot2uv
 
- END MODULE
-
+ END MODULE inifor_transform
+
Index: palm/trunk/UTIL/inifor/src/inifor_types.f90
===================================================================
--- palm/trunk/UTIL/inifor/src/inifor_types.f90	(revision 3615)
+++ palm/trunk/UTIL/inifor/src/inifor_types.f90	(revision 3618)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! Prefixed all INIFOR modules with inifor_
+! 
+! 
+! 3557 2018-11-22 16:01:22Z eckhard
 ! Updated documentation
 ! 
@@ -61,7 +65,7 @@
 !> The types module provides derived data types used in INIFOR.
 !------------------------------------------------------------------------------!
- MODULE types
+ MODULE inifor_types
  
- USE defs,                                                                     &
+ USE inifor_defs,                                                              &
     ONLY:  dp, DATE, PATH, SNAME, LNAME
  USE netcdf,                                                                   &
@@ -253,4 +257,4 @@
  END TYPE container
 
- END MODULE types
-
+ END MODULE inifor_types
+
Index: palm/trunk/UTIL/inifor/src/inifor_util.f90
===================================================================
--- palm/trunk/UTIL/inifor/src/inifor_util.f90	(revision 3615)
+++ palm/trunk/UTIL/inifor/src/inifor_util.f90	(revision 3618)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! Prefixed all INIFOR modules with inifor_
+! 
+! 
+! 3557 2018-11-22 16:01:22Z eckhard
 ! Updated documentation
 ! 
@@ -54,12 +58,12 @@
 !> The util module provides miscellaneous utility routines for INIFOR.
 !------------------------------------------------------------------------------!
- MODULE util
-
+ MODULE inifor_util
+
+    USE inifor_defs,                                                           &
+        ONLY :  dp, PI, DATE, SNAME
+    USE inifor_types,                                                          &
+        ONLY :  grid_definition
     USE, INTRINSIC :: ISO_C_BINDING,                                           &
         ONLY :  C_CHAR, C_INT, C_PTR, C_SIZE_T
-    USE defs,                                                                  &
-        ONLY :  dp, PI, DATE, SNAME
-    USE types,                                                                 &
-        ONLY :  grid_definition
 
     IMPLICIT NONE
@@ -415,4 +419,4 @@
     END SUBROUTINE
 
- END MODULE
-
+ END MODULE inifor_util
+
