Index: palm/trunk/UTIL/inifor/src/inifor_types.f90
===================================================================
--- palm/trunk/UTIL/inifor/src/inifor_types.f90	(revision 3779)
+++ palm/trunk/UTIL/inifor/src/inifor_types.f90	(revision 3866)
@@ -26,4 +26,8 @@
 ! -----------------
 ! $Id$
+! Use PALM's working precision
+!
+! 
+! 3779 2019-03-05 11:13:35Z eckhard
 ! Improved variable naming
 ! 
@@ -68,11 +72,13 @@
 !> The types module provides derived data types used in INIFOR.
 !------------------------------------------------------------------------------!
-#if defined ( __netcdf )
  MODULE inifor_types
  
  USE inifor_defs,                                                              &
-    ONLY:  dp, DATE, PATH, SNAME, LNAME
+    ONLY:  DATE, PATH, SNAME, LNAME, wp
+
+#if defined ( __netcdf )
  USE netcdf,                                                                   &
     ONLY:  NF90_MAX_VAR_DIMS, NF90_MAX_NAME
+#endif
 
  IMPLICIT NONE
@@ -104,9 +110,9 @@
     CHARACTER(LEN=SNAME) ::  rotation_method      !< selects method for velocity rotation
 
-    REAL(dp)             ::  p0                   !< manually specified surface pressure [Pa]
-    REAL(dp)             ::  ug                   !< manually spefied geostrophic wind component in x direction [m/s]
-    REAL(dp)             ::  vg                   !< manually spefied geostrophic wind component in y direction [m/s]
-    REAL(dp)             ::  z0                   !< elevation of the PALM-4U domain above sea level [m]
-    REAL(dp)             ::  averaging_angle      !< latitudal and longitudal width of averaging regions [deg]
+    REAL(wp)             ::  p0                   !< manually specified surface pressure [Pa]
+    REAL(wp)             ::  ug                   !< manually spefied geostrophic wind component in x direction [m/s]
+    REAL(wp)             ::  vg                   !< manually spefied geostrophic wind component in y direction [m/s]
+    REAL(wp)             ::  z0                   !< elevation of the PALM-4U domain above sea level [m]
+    REAL(wp)             ::  averaging_angle      !< latitudal and longitudal width of averaging regions [deg]
     
     LOGICAL              ::  debug                       !< indicates whether --debug option was given
@@ -143,33 +149,33 @@
     INTEGER, ALLOCATABLE  ::  jjj(:)        !< profile averaging neighbour indices 
     INTEGER, ALLOCATABLE  ::  kkk(:,:,:)    !< indices of vertical interpolation neightbours, kkk(<source column>, <PALM k level>, <neighbour index>)
-    REAL(dp)              ::  lx            !< domain length in the first dimension [m]
-    REAL(dp)              ::  ly            !< domain length in the second dimension [m]
-    REAL(dp)              ::  x0            !< x coordinate of PALM-4U domain projection centre, i.e. location of zero distortion
-    REAL(dp)              ::  y0            !< y coordinate of PALM-4U domain projection centre, i.e. location of zwro distortion
-    REAL(dp)              ::  z0            !< displacement of the coordinate origin above sea level [m]
-    REAL(dp), ALLOCATABLE ::  x(:)          !< coordinates of cell centers in x direction [m]
-    REAL(dp), ALLOCATABLE ::  y(:)          !< coordinates of cell centers in y direction [m]
-    REAL(dp), POINTER     ::  z(:)          !< coordinates of cell centers in z direction [m]
-    REAL(dp), ALLOCATABLE ::  h(:,:,:)      !< heights grid point for intermediate grids [m]
-    REAL(dp), POINTER     ::  cosmo_h(:,:,:)!< pointer to appropriate COSMO level heights (scalar/w) [m]
-    REAL(dp), POINTER     ::  hhl(:,:,:)    !< heights of half layers (cell faces) above sea level in COSMO-DE, read in from 
-    REAL(dp), POINTER     ::  hfl(:,:,:)    !< heights of full layers (cell centres) above sea level in COSMO-DE, computed as arithmetic average of hhl
-    REAL(dp), POINTER     ::  depths(:)     !< depths of output soil layers, equal the depths of the source model (e.g. COSMO-DE)
-    REAL(dp), ALLOCATABLE ::  xu(:)         !< coordinates of cell faces in x direction [m]
-    REAL(dp), ALLOCATABLE ::  yv(:)         !< coordinates of cell faces in y direction [m]
-    REAL(dp), POINTER     ::  zw(:)         !< coordinates of cell faces in z direction [m]
-    REAL(dp), ALLOCATABLE ::  lat(:)        !< rotated-pole latitudes of scalars (cell centers) of the COSMO-DE grid [rad]
-    REAL(dp), ALLOCATABLE ::  lon(:)        !< rotated-pole longitudes of scalars (cell centres) of the COSMO-DE grid [rad]
-    REAL(dp), ALLOCATABLE ::  latv(:)       !< rotated-pole latitudes of v winds (face centres in latitudal/y direction) [rad]
-    REAL(dp), ALLOCATABLE ::  lonu(:)       !< rotated-pole latitudes of u winds (face centres in longitudal/x direction) [rad]
-    REAL(dp), ALLOCATABLE ::  clat(:,:)     !< latitudes of PALM-4U cell centres in COSMO-DE's rotated-pole grid [rad]
-    REAL(dp), ALLOCATABLE ::  clon(:,:)     !< longitudes of PALM-4U scalars (cell centres) in COSMO-DE's rotated-pole grid [rad]
-    REAL(dp), ALLOCATABLE ::  clatu(:,:)    !< latitudes of PALM-4U u winds (cell faces in u direction) in COSMO-DE's rotated-pole grid [rad]
-    REAL(dp), ALLOCATABLE ::  clonu(:,:)    !< longitudes of PALM-4U u winds (cell faces in u direction) in COSMO-DE's rotated-pole grid [rad]
-    REAL(dp), ALLOCATABLE ::  clatv(:,:)    !< latitudes of PALM-4U v winds (cell faces in v direction) in COSMO-DE's rotated-pole grid [rad]
-    REAL(dp), ALLOCATABLE ::  clonv(:,:)    !< longitudes of PALM-4U v winds (cell faces in v direction) in COSMO-DE's rotated-pole grid [rad]
-    REAL(dp), ALLOCATABLE ::  w_horiz(:,:,:)   !< weights for bilinear horizontal interpolation
-    REAL(dp), ALLOCATABLE ::  w_verti(:,:,:,:) !< weights for linear vertical interpolation
-    REAL(dp), ALLOCATABLE ::  w(:,:,:)      !< vertical interpolation weights, w(<source_column>, <PALM k level>, <neighbour index>) [-]
+    REAL(wp)              ::  lx            !< domain length in the first dimension [m]
+    REAL(wp)              ::  ly            !< domain length in the second dimension [m]
+    REAL(wp)              ::  x0            !< x coordinate of PALM-4U domain projection centre, i.e. location of zero distortion
+    REAL(wp)              ::  y0            !< y coordinate of PALM-4U domain projection centre, i.e. location of zwro distortion
+    REAL(wp)              ::  z0            !< displacement of the coordinate origin above sea level [m]
+    REAL(wp), ALLOCATABLE ::  x(:)          !< coordinates of cell centers in x direction [m]
+    REAL(wp), ALLOCATABLE ::  y(:)          !< coordinates of cell centers in y direction [m]
+    REAL(wp), POINTER     ::  z(:)          !< coordinates of cell centers in z direction [m]
+    REAL(wp), ALLOCATABLE ::  h(:,:,:)      !< heights grid point for intermediate grids [m]
+    REAL(wp), POINTER     ::  cosmo_h(:,:,:)!< pointer to appropriate COSMO level heights (scalar/w) [m]
+    REAL(wp), POINTER     ::  hhl(:,:,:)    !< heights of half layers (cell faces) above sea level in COSMO-DE, read in from 
+    REAL(wp), POINTER     ::  hfl(:,:,:)    !< heights of full layers (cell centres) above sea level in COSMO-DE, computed as arithmetic average of hhl
+    REAL(wp), POINTER     ::  depths(:)     !< depths of output soil layers, equal the depths of the source model (e.g. COSMO-DE)
+    REAL(wp), ALLOCATABLE ::  xu(:)         !< coordinates of cell faces in x direction [m]
+    REAL(wp), ALLOCATABLE ::  yv(:)         !< coordinates of cell faces in y direction [m]
+    REAL(wp), POINTER     ::  zw(:)         !< coordinates of cell faces in z direction [m]
+    REAL(wp), ALLOCATABLE ::  lat(:)        !< rotated-pole latitudes of scalars (cell centers) of the COSMO-DE grid [rad]
+    REAL(wp), ALLOCATABLE ::  lon(:)        !< rotated-pole longitudes of scalars (cell centres) of the COSMO-DE grid [rad]
+    REAL(wp), ALLOCATABLE ::  latv(:)       !< rotated-pole latitudes of v winds (face centres in latitudal/y direction) [rad]
+    REAL(wp), ALLOCATABLE ::  lonu(:)       !< rotated-pole latitudes of u winds (face centres in longitudal/x direction) [rad]
+    REAL(wp), ALLOCATABLE ::  clat(:,:)     !< latitudes of PALM-4U cell centres in COSMO-DE's rotated-pole grid [rad]
+    REAL(wp), ALLOCATABLE ::  clon(:,:)     !< longitudes of PALM-4U scalars (cell centres) in COSMO-DE's rotated-pole grid [rad]
+    REAL(wp), ALLOCATABLE ::  clatu(:,:)    !< latitudes of PALM-4U u winds (cell faces in u direction) in COSMO-DE's rotated-pole grid [rad]
+    REAL(wp), ALLOCATABLE ::  clonu(:,:)    !< longitudes of PALM-4U u winds (cell faces in u direction) in COSMO-DE's rotated-pole grid [rad]
+    REAL(wp), ALLOCATABLE ::  clatv(:,:)    !< latitudes of PALM-4U v winds (cell faces in v direction) in COSMO-DE's rotated-pole grid [rad]
+    REAL(wp), ALLOCATABLE ::  clonv(:,:)    !< longitudes of PALM-4U v winds (cell faces in v direction) in COSMO-DE's rotated-pole grid [rad]
+    REAL(wp), ALLOCATABLE ::  w_horiz(:,:,:)   !< weights for bilinear horizontal interpolation
+    REAL(wp), ALLOCATABLE ::  w_verti(:,:,:,:) !< weights for linear vertical interpolation
+    REAL(wp), ALLOCATABLE ::  w(:,:,:)      !< vertical interpolation weights, w(<source_column>, <PALM k level>, <neighbour index>) [-]
  END TYPE grid_definition
 
@@ -190,5 +196,5 @@
     INTEGER               ::  dimvarids_vel(3)  !< NetCDF IDs of the grid coordinates of velocities xu, yu, zu. Note that velocities are located at mix of both coordinates, e.g. u(xu, y, z).
     INTEGER               ::  dimvarids_soil(3) !< NetCDF IDs of the grid coordinates for soil points x, y, depth 
-    REAL(dp), POINTER     ::  time(:)           !< vector of output time steps
+    REAL(wp), POINTER     ::  time(:)           !< vector of output time steps
  END TYPE nc_file
 
@@ -199,4 +205,5 @@
 !> Metadata container for netCDF variables
 !------------------------------------------------------------------------------!
+#if defined ( __netcdf )
  TYPE nc_var
     INTEGER                               ::  varid     !< NetCDF ID of the variable
@@ -247,5 +254,5 @@
     LOGICAL                          ::  is_preprocessed = .FALSE. !< Inifor flag indicating whether the I/O group has been preprocessed
  END TYPE io_group 
-
+#endif
 
 !------------------------------------------------------------------------------!
@@ -257,9 +264,7 @@
 !------------------------------------------------------------------------------!
  TYPE container
-   REAL(dp), ALLOCATABLE ::  array(:,:,:)               !< generic data array
+   REAL(wp), ALLOCATABLE ::  array(:,:,:)               !< generic data array
    LOGICAL               ::  is_preprocessed = .FALSE.  !< flag indicating whether input array has been preprocessed
  END TYPE container
 
  END MODULE inifor_types
-#endif
-
