Index: palm/trunk/UTIL/chemistry/gasphase_preproc/mechanisms/def_passive/chem_gasphase_mod.f90
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/mechanisms/def_passive/chem_gasphase_mod.f90	(revision 3789)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/mechanisms/def_passive/chem_gasphase_mod.f90	(revision 3799)
@@ -98,4 +98,5 @@
                                                                  
   LOGICAL                     :: data_loaded = .FALSE.             
+  REAL(dp), POINTER, DIMENSION(:), CONTIGUOUS    :: var             
 ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ! 
@@ -113,6 +114,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Parameters.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -188,6 +189,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Global.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -203,11 +204,10 @@
 
 ! C - Concentration of all species
-  REAL(kind=dp):: c(nspec)
+  REAL(kind=dp), TARGET    :: c(nspec)
 ! VAR - Concentrations of variable species (global)
-  REAL(kind=dp):: var(nvar)
+! REAL(kind=dp):: var(nvar)  var is now POINTER
 ! FIX - Concentrations of fixed species (global)
   REAL(kind=dp):: fix(nfix)
 ! VAR,FIX are chunks of array C
-      EQUIVALENCE( c(1), var(1))
 ! RCONST - Rate constants (global)
   REAL(kind=dp):: rconst(nreact)
@@ -254,6 +254,6 @@
 ! 
 ! File                 : chem_gasphase_mod_JacobianSP.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -298,6 +298,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Monitor.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -358,6 +358,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Initialize.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -384,6 +384,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Integrator.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -442,6 +442,6 @@
 ! 
 ! File                 : chem_gasphase_mod_LinearAlgebra.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -469,6 +469,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Jacobian.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -496,6 +496,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Function.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -525,6 +525,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Rates.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -551,6 +551,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Util.f90
-! Time                 : Fri Mar  8 19:00:59 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:22 2019
+! Working directory    : /home/forkel-r/palmstuff/work/trunk20190315/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
 ! Equation file        : chem_gasphase_mod.kpp
 ! Output root filename : chem_gasphase_mod
@@ -667,4 +667,10 @@
  
  
+  ! openmp directives generated by kp4 
+ 
+  !$OMP THREADPRIVATE (vl, vl_glo, is, ie, data_loaded)
+  !$OMP THREADPRIVATE (c, var, fix, rconst, time, temp, stepmin, cfactor)
+  !$OMP THREADPRIVATE (qvap, fakt, cs_mech, a, icntrl, rcntrl)
+ 
  CONTAINS
  
@@ -678,4 +684,8 @@
   k = is
   cfactor = 1.000000e+00_dp
+!  
+! Following line is just to avoid compiler message about unused variables
+IF ( lu_crow(1) == 1  .OR.  lu_icol(1) == 1  .OR.  lu_irow(1) == 1 )  CONTINUE 
+!  
 
   x = (0.) * cfactor
@@ -763,4 +773,7 @@
 
 
+! Following line is just to avoid compiler message about unused variables
+IF ( f(nfix) > 0.0_dp )  CONTINUE
+!  
 ! Computation of equation rates
 
@@ -798,4 +811,7 @@
 ! B - Temporary array
   REAL(kind=dp):: b(2)
+!
+! Following line is just to avoid compiler message about unused variables
+IF ( f(nfix) > 0.0_dp )  CONTINUE
 
 ! B(1) = dA(1)/dV(1)
@@ -921,4 +937,7 @@
       REAL(kind=dp) :: x(n), alpha
       REAL(kind=dp), PARAMETER  :: zero=0.0_dp, one=1.0_dp
+!  
+! Following line is just to avoid compiler message about unused variables
+IF ( incx == 0 )  CONTINUE
 
       IF (alpha .eq. one)RETURN
@@ -984,4 +1003,7 @@
       REAL(kind=dp), PARAMETER :: zero = 0.0_dp
 
+!  
+! Following line is just to avoid compiler message about unused variables
+IF ( incx == 0  .OR.  incy == 0 )  CONTINUE
       IF (alpha .eq. zero)RETURN
       IF (n .le. 0)RETURN
@@ -1716,4 +1738,7 @@
 !~~~> inout variables
    REAL(kind=dp), INTENT(INOUT):: b(n)
+!  
+! Following line is just to avoid compiler message about unused variables
+IF ( pivot(1) == 0 )  CONTINUE
 
 #ifdef full_algebra    
@@ -2266,4 +2291,6 @@
   IF (PRESENT (rcntrl_i)) rcntrl  = rcntrl_i                      
                                                                     
+  var => c(1:nvar)                                                 
+                                                                    
   vl_glo = size(tempi, 1)                                           
                                                                     
