Index: palm/trunk/UTIL/chemistry/gasphase_preproc/mechanisms/def_passive1/chem_gasphase_mod.f90
===================================================================
--- palm/trunk/UTIL/chemistry/gasphase_preproc/mechanisms/def_passive1/chem_gasphase_mod.f90	(revision 3789)
+++ palm/trunk/UTIL/chemistry/gasphase_preproc/mechanisms/def_passive1/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:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -187,6 +188,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Global.f90
-! Time                 : Fri Mar  8 19:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -202,11 +203,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)
@@ -253,6 +253,6 @@
 ! 
 ! File                 : chem_gasphase_mod_JacobianSP.f90
-! Time                 : Fri Mar  8 19:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -297,6 +297,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Monitor.f90
-! Time                 : Fri Mar  8 19:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -356,6 +356,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Initialize.f90
-! Time                 : Fri Mar  8 19:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -382,6 +382,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Integrator.f90
-! Time                 : Fri Mar  8 19:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -440,6 +440,6 @@
 ! 
 ! File                 : chem_gasphase_mod_LinearAlgebra.f90
-! Time                 : Fri Mar  8 19:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -467,6 +467,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Jacobian.f90
-! Time                 : Fri Mar  8 19:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -494,6 +494,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Function.f90
-! Time                 : Fri Mar  8 19:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -523,6 +523,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Rates.f90
-! Time                 : Fri Mar  8 19:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -549,6 +549,6 @@
 ! 
 ! File                 : chem_gasphase_mod_Util.f90
-! Time                 : Fri Mar  8 19:01:00 2019
-! Working directory    : /home/forkel-r/palmstuff/work/trunk20190308/UTIL/chemistry/gasphase_preproc/tmp_kpp4palm
+! Time                 : Fri Mar 15 16:28:23 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
@@ -665,4 +665,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
  
@@ -676,4 +682,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
@@ -761,4 +771,7 @@
 
 
+! Following line is just to avoid compiler message about unused variables
+IF ( f(nfix) > 0.0_dp )  CONTINUE
+!  
 ! Computation of equation rates
 
@@ -794,4 +807,7 @@
 ! B - Temporary array
   REAL(kind=dp):: b(1)
+!
+! Following line is just to avoid compiler message about unused variables
+IF ( f(nfix) > 0.0_dp )  CONTINUE
 
 ! B(1) = dA(1)/dV(1)
@@ -912,4 +928,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
@@ -975,4 +994,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
@@ -1707,4 +1729,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    
@@ -2256,4 +2281,6 @@
   IF (PRESENT (rcntrl_i)) rcntrl  = rcntrl_i                      
                                                                     
+  var => c(1:nvar)                                                 
+                                                                    
   vl_glo = size(tempi, 1)                                           
                                                                     
